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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Gokul_G16
Resolver I
Resolver I

Date difference dax logics

Dear friends,

Here, I'm showcasing the quick snap for the kind reference for while calculating the Datedifference in dax level and excel sources.

Gokul_G16_0-1686833939122.pngGokul_G16_2-1686834353513.png

 


I'm appling the dax logics for date comparesion same logics in excel also. but excel calculating fine. dax level shocasing something wrong.
Logic 1 =  6-16-2021 - 6-15-2023 = 23  excel
logic 2 =  6-16-2021 -6-15-2023 = 24 DAX power bi.

Kindly support team,

Regards,
Gokul

1 ACCEPTED SOLUTION
Mahesh0016
Super User
Super User

@Gokul_G16 I hope this helps you!THANK YOU!!

DateMonth =
DATEDIFF ( DATE ( 2021, 06, 16 ), DATE ( 2023, 06, 15 ), MONTH ) - 1
 

Mahesh0016_0-1686836408499.png

 

View solution in original post

1 REPLY 1
Mahesh0016
Super User
Super User

@Gokul_G16 I hope this helps you!THANK YOU!!

DateMonth =
DATEDIFF ( DATE ( 2021, 06, 16 ), DATE ( 2023, 06, 15 ), MONTH ) - 1
 

Mahesh0016_0-1686836408499.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.