Forum Discussion
Difference Between Quarter display wrong values
Dear Power BI Comunity,
I want to calculate the difference between two dates in quarters.
However I'm getting a woring values below a screenshot,
Thanks in advance,
Hi Mokhtar ,
I think you could refer to az38 ' s suggestions to check whether you set aggregation on column
Or you could try below expression
Column = 'Table'[end].[QuarterNo]-'Table'[start].[QuarterNo]Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- daxCommunity Support
Hi Mokhtar ,
I think you could refer to az38 ' s suggestions to check whether you set aggregation on column
Or you could try below expression
Column = 'Table'[end].[QuarterNo]-'Table'[start].[QuarterNo]Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- MokhtarFrequent Visitor
Hello,
Thanks for the answer. It was because of the aggregation.
Regards,
Mokhtar
- Pragati11Super User
Hi Mokhtar ,
Your result looks correct according to your DAX used. You are returning difference between 2 dates in QUARTER. Therefore the result is 1. Because 30 Dec 2019 is 1 Quarter before 15 Mar 2020.
If you want the difference between 2 dates in Months, Days, etc., you need to chnage the 3rd paratmeter in your DATEDIFF functions.
Refer the following link for the same:
https://docs.microsoft.com/en-us/dax/datediff-function-dax
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati