Forum Discussion
Anonymous
7 years agoNot applicable
Creating custom Column based on multiple conditions and comparison
Hello there , I am looking for help, how can we create a dax expression based on multiple condition and comparison ? , below is the scenario which i wish to obtain, so for example we have data a...
- 7 years ago
Hi Anonymous,
We can create a calculated column using the formula to meet your requirement.
excepted col = VAR maxdate = CALCULATE ( MAX ( Table1[Date] ), FILTER ( ALL ( Table1 ), Table1[ID] = EARLIER ( Table1[ID] ) ) ) RETURN IF ( Table1[Date] = maxdate && Table1[Satisfaction] = "NOT SATISFIED", 1, BLANK () )
For more details, please check the pbix as attached.Regards,
Frank
v-frfei-msft
7 years agoCommunity Support
Hi Anonymous,
We can create a calculated column using the formula to meet your requirement.
excepted col =
VAR maxdate =
CALCULATE (
MAX ( Table1[Date] ),
FILTER ( ALL ( Table1 ), Table1[ID] = EARLIER ( Table1[ID] ) )
)
RETURN
IF (
Table1[Date] = maxdate
&& Table1[Satisfaction] = "NOT SATISFIED",
1,
BLANK ()
)
For more details, please check the pbix as attached.
Regards,
Frank