Forum Discussion
DATEDIFF Incorrect Conversion Output
- 4 years ago
I've only got working results also.
See updated PBIX attached. Page 2.
The first place I'd be looking is the data types for the dates and see if there are any conversion issues/locale issues, but I doubt that is going to account for such significant differences.
- 4 years ago
Add custom column:
= Duration.Days([DecommissionDate]-[DateFirstUse]))
Power BI doesn't like calculated date columns with a SQL datasource. Adding a custom column in Power Query produces correct calculations for all values.
The other thing to check, if any grouping/aggregation happening on the visualisation is causing misleading results. If it is already dumped into a table with no aggregation happening then I'm out of ideas for now.
Best of luck.
Add custom column:
= Duration.Days([DecommissionDate]-[DateFirstUse]))
Power BI doesn't like calculated date columns with a SQL datasource. Adding a custom column in Power Query produces correct calculations for all values.