Forum Discussion
Conditional formatting based on bechmarks that differ by columns
- Anonymous7 years ago
Hi Anonymous
You need to go to FORMAT section (1).
There choose CONDITIONAL FORMATING (2).
Choose the field to format. Another window will pop up.
Choose RULES (3), and BASED ON FIELD - Will be the new calculated field (4).
In the example, I format NAME according to COUNT of IDs.
Hi Anonymous
Are you missing a 'else' condition?
i.e.
Color = SWITCH(TRUE(),'APP'[Test]=A&&[AnswerStatus%]>.5, "#008000", 'APP'[Test]=B&&[AnswerStatus%]>.70, "#008000", 'APP'[Test]=C&&[AnswerStatus%]>.30, "#008000", "#ff0000")
Another way is, to create 3 calculated columns for each test result.
i.e.
Column_A_Result = IF(AnswerStatus>0.5,1,2)
Then format the column according to this number/column (1=green,2-red). And you can sum up the 1s (column_sum = SUM(Column_A_Result,Column_B_Result ,Column_C_Result ))
Good luck!
A
Thanks so much for the assist Anonymous!
The else statement isn't needed with the switch. Instead, I added a >= and a < clause - but no dice.
Exploring the column_result option. If I want to format the column according to this number/column (1=green,2-red), where in PowerBI can I apply the format to each column individually?
- Anonymous7 years agoNot applicable
Hi Anonymous
You need to go to FORMAT section (1).
There choose CONDITIONAL FORMATING (2).
Choose the field to format. Another window will pop up.
Choose RULES (3), and BASED ON FIELD - Will be the new calculated field (4).
In the example, I format NAME according to COUNT of IDs.