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.
Hi,
I have created a matix visual and I want to color each year to differenciate with other years
Solved! Go to Solution.
There @haider378
You can try using the conditional formatting function to add background colors to the value fields.
My sample table:
If the table is next, you may need to use unpivot to transform the table.
Select Product Group and Range Column, and then select Other Columns.
Then you can get a new table like the first one.
Create an array visual by this table, rotate the Row subtotals.
Then use conditional formmating:
1. Format by rule
Color measurement:
Rule Color =
Var _Range = MAX('Table'[Range])
Return
SWITCH(TRUE(),_Range="2017-18",1,_Range="2018-19",2,_Range="2019-20",3,4)
Result:
2.Format by field value
Color measurement:
Field Value Color =
Var _Range = MAX('Table'[Range])
Return
SWITCH(TRUE(),_Range="2017-18","Red",_Range="2018-19","Green",_Range="2019-20","Blue","Yellow")
For more information, see this blog: Conditonal Format in Power BI
You can download the pbix file from this link: File
Best regards
Rico Zhou
If this post helps,then consider Accepting it as the solution to help other members find it faster.
thank you so much for your detailed answar😊 appriciated
Hi @haider378
I am so glad to solve your problem. Could you kindly accept the helpful reply as a solution? More people will benefit from it.
Best Regards,
Rico Zhou
There @haider378
You can try using the conditional formatting function to add background colors to the value fields.
My sample table:
If the table is next, you may need to use unpivot to transform the table.
Select Product Group and Range Column, and then select Other Columns.
Then you can get a new table like the first one.
Create an array visual by this table, rotate the Row subtotals.
Then use conditional formmating:
1. Format by rule
Color measurement:
Rule Color =
Var _Range = MAX('Table'[Range])
Return
SWITCH(TRUE(),_Range="2017-18",1,_Range="2018-19",2,_Range="2019-20",3,4)
Result:
2.Format by field value
Color measurement:
Field Value Color =
Var _Range = MAX('Table'[Range])
Return
SWITCH(TRUE(),_Range="2017-18","Red",_Range="2018-19","Green",_Range="2019-20","Blue","Yellow")
For more information, see this blog: Conditonal Format in Power BI
You can download the pbix file from this link: File
Best regards
Rico Zhou
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Hi @v-rzhou-msft
No doubt your solution works, but is there any way to apply the same background to row headers as well?
In your case, can the bg color be applied to 2017-18,2018-19?
HI @v-rzhou-msft
I was wondering if its possible to change the color for the "ROWS". I mean in your example should be: "ProductPage".
I have this:
and i want to change the color of the rows (I mean the text in the first column, A) 0-15Days.... etc.
Im using matrix chart, if i use table chat, will work, but i need use matrix.
Hi @haider378
Do you want to change the color of the background behind the years in the Product Group column? if soI'm afraid you can't in a matrix. You can however change the colour of the values in the rows for example (this is a mock up)
is that what you are after?
regards
Phil
Proud to be a Super User!
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |