Forum Discussion
Anonymous
3 years agoNot applicable
DAX measure error date is incompatible with int.
Hi all, Im trying to configure the functionality where based on a selection of a month in the filter, the visual shows the previous 12 months going back from the selected month. I wrote a DAX meas...
johnt75
Super User
3 years agoTry
12 Months back =
VAR CurrentDate =
SELECTEDVALUE ( 'dim_Date'[EOM Date], MAX ( 'dim_Date'[EOM Date] ) )
VAR Result =
CALCULATE (
SUM ( 'fact'[column] ),
DATESINPERIOD ( 'Date'[Date], CurrentDate, -12, MONTH )
)
RETURN
Result
- Anonymous3 years agoNot applicable
Results in the following error: Invalid Numeric Representation of a Date Value
- johnt753 years ago
Super User
Try changing it to return the CurrentDate variable and see what that shows.