Hi All,
Error message - An invalid numeric representation of a date value was encountered
Root cause - We are trying to compare with a measure value
Workaround - The workaround suggested by the documentation is to filter the Date table and pass it as a table filter to calculate. This requires ignoring first the filter context on the Date table, only to overwrite it later with the ‘as of date’.
Solution - =CALCULATE( SUM(Sales[SalesAmount]), FILTER( ALL( ‘Date’[CalendarYear]), [CalendarYear] = MAX(‘Date’[CalendarYear]) ) )
Refer below link for solution
https://prologika.com/dax-variables-to-rescue/
No comments:
Post a Comment