Kevin Adams on 28 Oct 2016 02:15:31
The DATEDIFF function in Power BI DAX, should not require the start date arg to preceed the date given the end date arg. The DATEDIFF function in SQL does not impose this requirement.
This would make implementing the DATEDIFF arg in a date dimension table (with dates going into the future) much easier. Currently the DATEDIFF must be wrapped in an IF statement to work correctly.
Finally, it would seem like this could be fixed by having DATEDIFF in Power BI DAX return a signed, rather than unsigned integer.
- Comments (6)
RE: Date Diff start date not required to preceed end date
It had been working in SASS since Jan 2018 until yesterday (May 2019 I updated my VS 2017).
RE: Date Diff start date not required to preceed end date
However... I don't think this change was done for SSAS Tabular as DATEDIFF there still returns the same error...?
RE: Date Diff start date not required to preceed end date
Datediff now returns a negative value so this has been implemented? No notice?!
RE: Date Diff start date not required to preceed end date
Since when has this been rolled out without notice?
RE: Date Diff start date not required to preceed end date
I would suggest making a new function to ensure existing reports keep working
RE: Date Diff start date not required to preceed end date
I too have similar situation while working on the Dashboard for Network Scehculde for project Plan;
This make it simpler to write DAX