Forum Discussion
DATEADD Result return blank (Please help)
Hi All
Im currently having an error with DATEADD Dax function, in the middle of the data there is a blank result which I couldnt figure out why.
Dax used:
Please advice. Thank you.
- Anonymous4 years ago
Hi Anonymous ,
Dateadd: Returns a table that contains a column of dates
Please try to use EOMONTH.
Measure 1 = EOMONTH(MAX(Sheet1[Month]),-2)Measure = VAR A = Sheet1[Measure 1] RETURN CALCULATE ( MAX ( Sheet1[Count CM] ), FILTER ( ALL ( Sheet1 ), Sheet1[Month] = A ) )Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
Anonymous , You should always use date for that. dateadd need continuous dates
Measure 1 = DATEADD(Date[Date],-2,month)
example
Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year)) - AnonymousNot applicable
Hi Anonymous ,
Dateadd: Returns a table that contains a column of dates
Please try to use EOMONTH.
Measure 1 = EOMONTH(MAX(Sheet1[Month]),-2)Measure = VAR A = Sheet1[Measure 1] RETURN CALCULATE ( MAX ( Sheet1[Count CM] ), FILTER ( ALL ( Sheet1 ), Sheet1[Month] = A ) )Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.