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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Satish_Kumar
Helper V
Helper V

how to calculate date difference between two date

Hi,

 

I am trying to calculate date difference two dates which in two different column but when i am applying DATEDIFF its gives me error

please suggest me where i am doing wrong.

 

Regards,

Satisherror1.png

1 ACCEPTED SOLUTION

this is working for now...

 

Day Difference = DATEDIFF(('GRN Pst TO GRN Entry Date'[GRN_POSTING_DATE].[Date]),('GRN Pst TO GRN Entry Date'[GRN_ENTRY_DATE].[Date]),DAY)

View solution in original post

2 REPLIES 2
Interkoubess
Solution Sage
Solution Sage

Hi @Satish_Kumar,

 

Please remove the minus(-) between the date and replace it by comma(,).

 

You can see how datediff works: 

DATEDIFF(<start_date>, <end_date>, <interval>)  

 

Hope it helps...

 

Ninter

 

this is working for now...

 

Day Difference = DATEDIFF(('GRN Pst TO GRN Entry Date'[GRN_POSTING_DATE].[Date]),('GRN Pst TO GRN Entry Date'[GRN_ENTRY_DATE].[Date]),DAY)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.