The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
82 | |
81 | |
37 | |
34 | |
32 |
User | Count |
---|---|
96 | |
79 | |
61 | |
51 | |
51 |