cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

DATEDIFF Measure error

Hi there,

 

I need to get the days between two dates. The two dates are both measures. 

I keep getting the error below, even if I swop the dates.

 

Annemie19_0-1598611312774.png

 

The formula I used is:  

AA Days diff = DATEDIFF([AA Last value date], [AA Latest Actual date] ,DAY)
My dates are
 
111.JPG
 

 

 

 

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@Annemie19 , This should have work

AA Days diff = if([AA Last value date]< [AA Latest Actual date], DATEDIFF([AA Last value date], [AA Latest Actual date] ,DAY), DATEDIFF([AA Latest Actual date] ,[AA Last value date], DAY))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
Super User IV
Super User IV

@Annemie19 , This should have work

AA Days diff = if([AA Last value date]< [AA Latest Actual date], DATEDIFF([AA Last value date], [AA Latest Actual date] ,DAY), DATEDIFF([AA Latest Actual date] ,[AA Last value date], DAY))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.