Forum Discussion
shanerolle
6 years agoFrequent Visitor
How to apply conditional formatting in a matrix based on value comparisons?
Hello, I have a matrix set up to show expenses and budget, per account, for each month. So the columns are based on date, rows are based on account number, and the values of the matrix are expens...
- 6 years ago
Hi shanerolle ,
If what you want is like the screenshot below, try this:
1. Assume that your Expense value in matrix is a measure.
Expense Measure = SUM('Table'[Expense])2. Create a condition measure.
Condition = VAR Percent_ = [Expense Measure] / SUM ( 'Table'[Budget] ) RETURN SWITCH ( TRUE (), Percent_ < .9, 1, Percent_ >= .9 && Percent_ < 1, 2, Percent_ >= 1, 3 )3. Set conditional formatting.
Then you can get what you want.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
6 years agoCommunity Support
Hi shanerolle ,
If what you want is like the screenshot below, try this:
1. Assume that your Expense value in matrix is a measure.
Expense Measure = SUM('Table'[Expense])
2. Create a condition measure.
Condition =
VAR Percent_ =
[Expense Measure] / SUM ( 'Table'[Budget] )
RETURN
SWITCH (
TRUE (),
Percent_ < .9, 1,
Percent_ >= .9
&& Percent_ < 1, 2,
Percent_ >= 1, 3
)
3. Set conditional formatting.
Then you can get what you want.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.