Forum Discussion
Dateadd issue with quarter
- 4 years ago
Hi, Vladan
This problem may be due to the fact that DATEADD does not correctly identify the end of the month, and on June 30 he wants to return March 30, but there is no such date in the table.
You can try the function EDATE. https://docs.microsoft.com/dax/edate-function-dax
At this time, two dates appear, March 30 and March 31. In order to display the dates of the previous quarter, you can try to specify the data range in the form of Year-month.
Measure = CALCULATE('Table'[Assets 1],FILTER(ALL('Table'),[Year Month]=SELECTEDVALUE('Table'[Last Quarter])))Is this the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Vladan
This problem may be due to the fact that DATEADD does not correctly identify the end of the month, and on June 30 he wants to return March 30, but there is no such date in the table.
You can try the function EDATE. https://docs.microsoft.com/dax/edate-function-dax
At this time, two dates appear, March 30 and March 31. In order to display the dates of the previous quarter, you can try to specify the data range in the form of Year-month.
Measure =
CALCULATE('Table'[Assets 1],FILTER(ALL('Table'),[Year Month]=SELECTEDVALUE('Table'[Last Quarter])))
Is this the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.