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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
NightingaleG3
New Member

DATEDIFF not showing correctly

Hello, 

 

Very new to Power BI 😃

 

I've found the following way to show sum of days between in a table. I've added a colunm with the following: 

Days between = DATEDIFF('Table_query'[Month Raised (Date)].[Day],'Table_query'[Month Assigned To WD Team Member (Date)].[Day],DAY)
 
Seems to work except on 1 highlighted below, showing as -7. When is should be 24. Can anyone advise on what's gone wrong? 
 
 
NightingaleG3_0-1706803694469.png

Many Thanks 

1 ACCEPTED SOLUTION
mlsx4
Super User
Super User

Hi @NightingaleG3 

 

You're calculating difference between days (without taking into account anything else: month or year). Therefore: 8-15=-7

 

Try by removing the .[day] in your formula

View solution in original post

2 REPLIES 2
NightingaleG3
New Member

@mlsx4 Thank you that worked 😊

mlsx4
Super User
Super User

Hi @NightingaleG3 

 

You're calculating difference between days (without taking into account anything else: month or year). Therefore: 8-15=-7

 

Try by removing the .[day] in your formula

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.