cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Helper V
Helper V

Re: how to calculate date difference between two date

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
Highlighted
Solution Sage
Solution Sage

Re: how to calculate date difference between two date

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

 

Highlighted
Helper V
Helper V

Re: how to calculate date difference between two date

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

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors