Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Finding lost orders in a calculated column

Hi!   I am having trouble writing a DAX formula for a calculated column. In summary, my organization recieves a ton of orders everyday from different customers. It is possible that an order can be ...
  • Greg_Deckler's avatar
    Greg_Deckler
    6 years ago

    You may probably try:

    LOST ORDER =
      VAR __OrderID = [ORDER ID]
      VAR __Date = [DATE]
      VAR __Table = FILTER('Table',[DATE] = __Date + 1.)
    RETURN
      SWITCH(TRUE(),
        __Date = TODAY(),0,
        __OrderID IN SELECTCOLUMNS(__Table,"OrderID",[ORDER ID]),0,
        1
      )