March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Objective:
Conditional formatting on Pie Visual
Steps:
If we open pie data color, there is no option for conditional formatting.
But we have one for Bar Visual
Let us do some scale based coloring on Bar Visual
We can see Bar is having conditional formatting
Now change it to pie. It takes the color for each brand
But, what I want is a fixed color for each brand. So I created a color measure
Switch( true(),
max('Item'[brand]) = "Brand 1" , "red",
max('Item'[brand]) = "Brand 2" , "blue",
max('Item'[brand]) = "Brand 3" , "green",
max('Item'[brand]) = "Brand 4" , "gray",
max('Item'[brand]) = "Brand 5" , "yellow",
max('Item'[brand]) = "Brand 6" , "orange",
max('Item'[brand]) = "Brand 7" , "brown",
max('Item'[brand]) = "Brand 8" , "Cyan",
max('Item'[brand]) = "Brand 9" , "Tan",
max('Item'[brand]) = "Brand 10" , "Violet",
max('Item'[brand]) = "Brand 11" , "Gold",
"silver"
)
Now I can create a bar or table visual and use that using the "Field Value" Option, and choose this measure.
The same step, change the visual to pie now
You can watch the video for detailed steps
Let us know what you think about this.
You can get all my posts at https://community.powerbi.com/t5/Data-Stories-Gallery/Blog-Analysis/m-p/1265567#M4403
You can also follow my YouTube channel (YouTube) and LinkedIn (profile) to get information on the upcoming webinars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.