Forum Discussion
Creating custom Column based on multiple conditions and comparison
- 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
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
Thank you very very much for your help v-frfei-msft, this worked just great,
i am also having one another issue calculating the cumulative average, but thats a another question on discussion, still i am posting that link, please see if you can help me figure that out as well,
link:
https://community.powerbi.com/t5/Desktop/Calculating-Cumulative-total-of-average-using-DAX-expression/m-p/508842#M237710
Much thanks v-frfei-msft
Regards,
Malav