DAX Measure to Calculate and Filter Two Date Columns

ExcelingInLife

New Member
Joined
May 1, 2020
Messages
7
Hello,

I was hoping someone would be able to help, I am looking to incorporate a measure for a cube value formula in excel where the date input is dynamic based on where the formula is.

Essentially I am trying to use the data below to say based on the date selection in excel (lets use 2/28/2020), I want to know the total payment amount in February for invoices with a date prior to February 2020.

I started with the below measure, but clearly it doesn't work, any ideas?

calculate([PaymentTotal], Data[DateType] = "Invoice Date", PaymentData[DateValue] < 'Date'[Date])


NameInv AmtPayment AmountDateTypeDateValue
ClientA
30​
-30​
Invoice Date
1/31/2020​
dbfbf
30​
-30​
Payment Posted
2/7/2020​
ClientB
30​
-30​
Invoice Date
1/31/2020​
fubfkhb
30​
-30​
Payment Posted
2/7/2020​
fnjfkj
30​
-30​
Invoice Date
1/31/2020​
fnl
30​
-30​
Payment Posted
2/7/2020​
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top