Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX expression - If condition

Hi! I have a table similar to the table below. I want to write a DAX expression that would do the following job - If the Time stamp is wk 22, then divide the sum of amount by 3 else keep the sum of ...
  • Greg_Deckler's avatar
    6 years ago

    So, like this?

    Measure = 

      VAR __timestamp = MAX('Table'[Timestamp])

    RETURN

      IF(__timestamp = "wk 22",SUM([Amount])/3,SUM([Amount]))