Forum Discussion
Sunburst with evolution per month
Hello Power BI community
I want to create a sunchart to show the sum of the values in my Value column. Here's an example of the chart I have:
I want to create a chart to show the destubution by category and the evolution of categories by month, something like this :
Here's what I was able to create in Power BI, but it doesn't help me because I don't have the evolution by month.
==> I have 19 categories and I want to see the evolution of these categories each month.
Thank you for your help
giammariam luojiandanPBI amitchandak Ritaf1983 Ahmedx dm-p KerKol ppm1
MargNIOP, let me know if this will work. I did my best to try and make sure that the capability labels do not overlap. The tooltip only shows if there has been a change from one month to the next. I didn't do anything with the stacked bar chart, but the stacked bar chart that comes with Power BI should be able to fulfill your needs.
If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.
17 Replies
- giammariamSolution Sage
Hey MargNIOP, thanks for tag. I'd be happy to give this a shot. Just so I understand, is the evolution a rolling sum of the value over each month per category?
- MargNIOPHelper I
- giammariamSolution Sage
MargNIOP, thank you, that's helpful. I'll get started. In the meantime, how would you like to encode the different categories? It looks like the month will be represented by color. I'm trying to think about how we can represent the different categories within each month in the sunburst.
- MargNIOPHelper I
Thanks for your help,
Yes, the evolution by month can be represented by the graduation of color (please propose other solutions if you have any)
looking forward to seeing your proposition 😄
- giammariamSolution Sage
Hi MargNIOP I was having some trouble getting it to look how you described. The sunburst is a hierarchical chart where the items higher up in the hierarchy are closer to the center. Since you wanted a rolling sum, it actually makes sense to have the months to be in the order starting from outside to inside. This will show that cumulation that you were describing (note how the arc angles for each category get larger the closer you get to the center). Additionally, instead of using color for the months, I found that it made sense to use color for the categories, and then use labels to show which "rings" represent which months. I also included labels for each category.
I know that these are pretty significant deviations from which you first proposed. Let me know your thoughts and suggestions. I want to get the design right before getting it into Deneb and Power BI.
Here is a gist that allows for tooltip interactivity and shows how it was implented in Vega.
- giammariamSolution Sage
MargNIOP, that's great, I'll provide a sample .pbix that utilizes this code in Deneb. Deneb takes your dataset and converts it into JSON. In order for me to get you the .pbix, can you either confirm or correct me on the following?
- You are providing 3 fields named Month, Cat, and Value. (let me know if you want to add more fields for tooltips, etc., and/or if your dataset contains different field names)
- All months will be in the same year. If this is not the case, then I suggest you provide a full date, including the year, for each month. Example: "12/1/2022" for December 2022 and "1/1/2023" for January 2023.
Thanks!
- MargNIOPHelper I
Here's a complete table for me, I also have the column title and domain that I want to use only for filtering.
For the date, it's OK, I can give the full date.
Thanks again !
- giammariamSolution Sage
Hey MargNIOP, here's the .pbix. I hope this works out for you.
If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.