DateDiff not working the same in excel as it is Powerbi

jak828

New Member
Joined
Jul 1, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

In PowerBI I have a measure with

DaysPastDueDate = DATEDIFF (AUDIT_HEADER[DUE_DATE], TODAY (),DAY)

That doesnt seem to work in Excel PowerPivot and it requires it to be a calculated column.

If I make the column witrh that calculation it doesnt seem to like it when the start date is greater than the end date.. in Powerbi this gives negative numbers however in Excel it causes it to break.

Any idea how to get round this when the start date is greater?

Thanks

Chris
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I have also tried

Excel Formula:
=IF(AUDIT_HEADER[DUE_DATE]>today(),-DATEDIFF (AUDIT_HEADER[DUE_DATE], TODAY (),DAY),DATEDIFF (AUDIT_HEADER[DUE_DATE], TODAY (),DAY))

to no avail.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top