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
From time to time I challenge myself to imitate creative vizualizations I stumble upon on the vast expanse of Internet using only standard visuals in Power BI. So this article is all about one of those challenges.
Having found the chart below, I started thinking how one can create a pie chart where slices differ not only by sector width but by its length as well, if it is allowed to put it like that.
And I did find a way.
All in all, it is something more like a study rather than a recipe for production usage so think twice before applying this solution to your dashboards.
We will start from such a simple pie chart.
Though it is simple it has a secret behind.
And this secret is hidden in the way the pie chart is colored. If you suppose that all those gradient shades were handpicked by me in the standard pie chart menu, you will be wrong, because in fact all the slices colors are defined by a measure. This one:
But you won't find an option to apply a measure in the pie chart settings, will you?
No, really, you won't, but such an option exists in the bar chart settings.
All you need to do is to add a bar chart, color it properly with a measure and then switch the visual type to a pie chart. The settings will be inherited somehow and the segment colors will be defined by the measure.
You should count the maximum possible number of slices on your pie chart and clone the pie chart as many times. Before cloning, mind to change transparency of the pie chart background to 100%.
For each additional pie chart you should prepare a color scheme measure similar to the original one with a small difference: the last 1, 2, 3, .., n-1 segments must have the color of the canvas background, where n is the maximum possible number of segments.
Here comes one more ruse to trick the system: if you use the same color for two adjacent segments, Power BI will split them by drawing a line between them. If you want to get rid of it, you should apply a different color for one of the segments, which differs by so little that a rare human eye will spot difference.
After that you adjust the size of all the pie charts: the smallest one should be one with the captions, the next one with one "missing" sector should be a little bigger, the next one - a little bit bigger than the second and so on - the one with the only green sector should be the biggest.
Then you select all of them and center by both axis.
Once done, you group them. At the bottom you can add a visual with the title and legend to make it look better.
That's it. Hope you will find this study and tricks I shared with you useful.
If you want, you can:
- watch YouTube video in English;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.