Forum Discussion

jj1's avatar
jj1
Helper II
1 year ago
Solved

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? 

  • jj1's avatar
    jj1
    1 year ago

    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

  • It will not show the Intellisense hints if you have an error in a previous part of your formula.

  • jj1's avatar
    jj1
    Helper 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 

  • jj1's avatar
    jj1
    Helper 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

  • jj1's avatar
    jj1
    Helper 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

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).