Forum Discussion
Anonymous
6 years agoNot applicable
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 ...
- 6 years ago
So, like this?
Measure =
VAR __timestamp = MAX('Table'[Timestamp])
RETURN
IF(__timestamp = "wk 22",SUM([Amount])/3,SUM([Amount]))
Greg_Deckler
Community Champion
6 years agoSo, like this?
Measure =
VAR __timestamp = MAX('Table'[Timestamp])
RETURN
IF(__timestamp = "wk 22",SUM([Amount])/3,SUM([Amount]))
Anonymous
6 years agoNot applicable
I got it to work. Thank you for your help!