Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MargNIOP
Helper I
Helper I

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:

 

MargNIOP_1-1698349639195.png

 

I want to create a chart to show the destubution by category and the evolution of categories by month, something like this :

 

MargNIOP_2-1698349665279.png

 

 

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.

 

MargNIOP_3-1698349975895.png

 

==> 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 

 

1 ACCEPTED SOLUTION

@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.

giammariam_0-1698952022610.png

 

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.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

17 REPLIES 17
giammariam
Super User
Super User

@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!



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

@giammariam 

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 !

 

MargNIOP_0-1698505839219.png

 

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.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

 

Thank you for your help

@MargNIOP, can you include a version that has the full Date instead of just the month name? Also, which would you prefer, the sunburst or the stacked bar chart?



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

 

It would be preferable to have both sunburst visuals and the stacked bar chart, this is an opportunity for me to learn how to create them in Deneb and see which one best suits my needs.
But if you can't, please provide only one.

Thanks again @giammariam 

@MargNIOP, thanks. 

For this:

For example, for the job satisfaction category: in October: 2; November: 2; December: 3; January: 3 ==> The tooltip displays October and January, but I'd like to get October and December, as the evolution took place in December.

What would the actual evolution value be in this scenario? would it be 1 because 3-2=1?



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

It should indicate December 3 to know that there was an evolution in December and that there was no evolution in November and January.

 

it's optional for me to have the difference between the two months in the tooltip

 

 

@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.

giammariam_0-1698952022610.png

 

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.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Hello @giammariam 

I have tried your code with my dataset, but it seems that the months are not ordered.

MargNIOP_0-1698831279449.png

 

giammariam
Super User
Super User

@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.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

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 😄

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.

giammariam_0-1698448089073.png

 





Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Hello @giammariam 

 

have you found a solution please ?

Wow, that's genius @giammariam Thank you so much !

I'm perfectly fine with your proposal, but I dont really know how to include your code in Power BI as my data is not in JSON ?

giammariam
Super User
Super User

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?



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Hello @giammariam , thank you for your relply

 

Yes exactly,

 

Something like this :

MargNIOP_0-1698391527150.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors