Forum Discussion
datediff dax -formula
hi im trying to use a simple datediff dax formula to obtain the sla difference in terms of calendar days between two date columns in the table- it should be very easy but when i selectthe datediff function-it is not giving the option to select the table from the query for th two date columns) normally any dax formula new calculation allows that . any ideas why it wont allow or show the selection as i type the datediff formula?
this is sovled-rather than using a new measure in the report view- i used dax datediff in the data(table view) and datediff works just fine to get sla from one date compared to another (calendar days for this purpose) and can be set for hours or weeks or days-i chose days and sla achieved via dax date diff after all--closing this one as solved- thanks all
14 Replies
- lbendlinSuper User
It will not show the Intellisense hints if you have an error in a previous part of your formula.
- jj1Helper II
the issue is in the table the date is listed as long form month day and hour and minute but when i move to the report it gives me in the date table only month and day and year and quarter so i guess since the report is not showing the hour and minute as in the table then it wont activate the normal datediff identifier
- lbendlinSuper User
That's not the reason. Look at the DAX code before that spot.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- jj1Helper II
Created Date Month Created Date Day Reply Date Month Reply Date Day Jan 20 Jan 22 April 21 April 25
- jj1Helper II
- jj1Helper II
so the report view is not giving the minute or hour maybe i need to add a new field idk? but the table view is giving that and i think that is why datediff wont recognize the table inthe query or allow me to select it
- jj1Helper II
so as i write the dax formula-it is not allowing me to select the activitypointer query and select the tables to calculate) normally dax formulas always allow this for me or anyone
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).