Forum Discussion
Anonymous
6 years agoNot applicable
Difference between MAX date and another date
Hi folks, I am struggling with a DAX expression to get the difference between the max date in a slicer and the date of the invoices, I mean: I have a table with clients, invoices and dates: ...
- 6 years ago
Hi Anonymous ,
You could create two measures to get it.
max date = MAXX ( ALLSELECTED ( 'Date'[Date] ), 'Date'[Date] )Days = DATEDIFF ( SELECTEDVALUE ( 'Table'[Date] ), [max date], DAY )Here is the result.
Here is my test file for your reference.
v-eachen-msft
6 years agoCommunity Support
Hi Anonymous ,
You could create two measures to get it.
max date =
MAXX ( ALLSELECTED ( 'Date'[Date] ), 'Date'[Date] )
Days =
DATEDIFF ( SELECTEDVALUE ( 'Table'[Date] ), [max date], DAY )
Here is the result.
Here is my test file for your reference.
- Anonymous6 years agoNot applicable
could it be possible to do it in a column instead of doing it in a measure? The reason is that I want to use this calculated value in a selector.