Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Mokhtar
Frequent Visitor

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,QuaterDiff.PNG

 

Thanks in advance,

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Mokhtar , 

I think you could refer to @az38 ' s suggestions to check whether you set aggregation on column

670.PNG

 Or you could try below expression 

Column = 'Table'[end].[QuarterNo]-'Table'[start].[QuarterNo]

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
dax
Community Support
Community Support

Hi @Mokhtar , 

I think you could refer to @az38 ' s suggestions to check whether you set aggregation on column

670.PNG

 Or you could try below expression 

Column = 'Table'[end].[QuarterNo]-'Table'[start].[QuarterNo]

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Mokhtar
Frequent Visitor

Hello,

 

Thanks for the answer. It was because of the aggregation.

 

Regards,

Mokhtar

Pragati11
Super User
Super 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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

az38
Community Champion
Community Champion

Hi @Mokhtar 

are you sure you do nt have any aggregation for datediff column in visual settings? Set "Do not aggregate"


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.