Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Days Between Dates- DAX and Column

Hello,    Looking to get days between dates, my current issues is that one date is a measure and the other is a column so struggling to find the correct way to do it.  I have included a screen shot...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Doc Age = DATEDIFF(Date_Selected, Document.c2g_DueDate__c, DAY)

  • Greg_Deckler's avatar
    6 years ago

    Should be able to use:

     

    Doc Age = ([Date_Selected] - MAX([Document.c2g_DueDate__c])) * 1.

     

    This would be a measure. Since you refer to a column, you have to wrap it in an aggregation like MIN, MAX, SUM, etc.