Forum Discussion
Power BI : Matrix Conditional Formatting for each column
- 5 years ago
Hi, Anonymous
The key is not in a certain column, each value in the matrix is originally related to the row and column, as long as the logic is correct. You can try to create a measure, then use it in conditional formatting.
Like this:
Measure = VAR a = SUMX ( FILTER ( ALL ( 'Table' ), [account] = SELECTEDVALUE ( 'Table'[account] ) && [month] = SELECTEDVALUE ( 'Table'[month] ) ), [cost] ) RETURN IF ( a < 1000, "Red" )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
The key is not in a certain column, each value in the matrix is originally related to the row and column, as long as the logic is correct. You can try to create a measure, then use it in conditional formatting.
Like this:
Measure =
VAR a =
SUMX (
FILTER (
ALL ( 'Table' ),
[account] = SELECTEDVALUE ( 'Table'[account] )
&& [month] = SELECTEDVALUE ( 'Table'[month] )
),
[cost]
)
RETURN
IF ( a < 1000, "Red" )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Janey,
Thanks for the solution. However, if I want to apply individual formatting to each column separately based on a range. How would I do that?
For Example, I want to highlight each column in a different shade of color based on a condition such as follows: If account1(value) >100 and <500 then Light Red else if account1(value) > 500 and <1000 then Purple else if account1(value) >1000 and <1500 then light green.
Thanks in advance.