Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a question regarding modeling a table that follows:
first of all I want to color column 1 as red and column 2 as yellow.
Secondly I want to order them as per picture.
I tried as shown here: https://community.powerbi.com/t5/Desktop/Matrix-Column-Head-Order/td-p/71572
But didn't work
Any possibilities?
Thanks
Solved! Go to Solution.
Hi @robertosangi ,
Please add the Index column in Power Query Editor:
Index = if [Sintesi Stato] = "non caratterizzato" then 1 else if [Sintesi Stato] = "in Progettazione" then 2 else if [Sintesi Stato] = "in autorizzazione" then 3 else 4
Then sort [Sintesi Stato] column by [Index] field.
Then create the measure and apply it to background color.
Measure =
SWITCH ( MAX ( 'Table'[Index] ), 1, "red", 2, "yellow" )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @robertosangi ,
Please add the Index column in Power Query Editor:
Index = if [Sintesi Stato] = "non caratterizzato" then 1 else if [Sintesi Stato] = "in Progettazione" then 2 else if [Sintesi Stato] = "in autorizzazione" then 3 else 4
Then sort [Sintesi Stato] column by [Index] field.
Then create the measure and apply it to background color.
Measure =
SWITCH ( MAX ( 'Table'[Index] ), 1, "red", 2, "yellow" )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@robertosangi The column part of the pivot we can not use conditional formatting
for values you can have
Switch(True() ,
Max(Table[Sintesto Stato]) , "Value of 2", "Yellow",
Max(Table[Sintesto Stato]) , "Value of 1", "Red",
//Add other
)
You can use this in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
64 | |
64 | |
52 | |
39 | |
24 |
User | Count |
---|---|
84 | |
57 | |
45 | |
44 | |
37 |