Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear all,
I am working with school data on sanitation and cleanliness and we are now starting to use PowerBi to analyze and present the data. We have a matrix in PwerBI based on a column with 5 values:
NP, no star, 1 star, 2 stars, 3 stars.
For each of these values, I present the number of schools that comply to this condition and the row percentage. The table looks like this:
What I would like to, but can not find is to give background colors on the columns, based on their header and not on the values inside the matrix. So for NP I would like to the two colums (# schools and % schools), to be colored grey, for no stars, red, 1 star yellow etc ..
Anyone has some suggestions on how to do this?
Thanks
Solved! Go to Solution.
Hi @Anonymous
You can create a measure like below and later use it for conditional formatting in your Matrix Visual.
conditional formating = VAR _sv = SELECTEDVALUE( 'Table'[Category] ) RETURN SWITCH( TRUE(), _sv = "NP", 1, _sv = "no star", 2, _sv = "1 star", 3 )
This is how you set up Conditional Formating on Value fields in your Matrix.
Hi @Anonymous
You can create a measure like below and later use it for conditional formatting in your Matrix Visual.
conditional formating = VAR _sv = SELECTEDVALUE( 'Table'[Category] ) RETURN SWITCH( TRUE(), _sv = "NP", 1, _sv = "no star", 2, _sv = "1 star", 3 )
This is how you set up Conditional Formating on Value fields in your Matrix.
Dear Mariusz,
just what the doctor ordered! Works like a charm,
Thanks ...
Ubo
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |