cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
alice11987
Helper I
Helper I

Donut chart with Median range as legend

Hi, 

 

I have a table which contains the following columns:

alice11987_0-1687315403185.png

 

And I would like to create a Donut chart like this:

  • legend by Median days range (<15 days,15-30 days, 31-60 days & 60+ days) 
  • case count as value

alice11987_2-1687315531916.png

 

How can I achieve this? 

 

thank you!

 

3 REPLIES 3
danextian
Super User
Super User

Hi @alice11987 

If you have the days count in your data, you can simply create a calculated column and use it as the legend.

=
SWITCH (
    TRUE (),
    table[dayscolumn] >= 61, "60+ days",
    table[dayscolumn] >= 31, "31-60 days",
    table[dayscolumn] >= 15, "15-30 days",
    " <15 days"
)

 

 

 






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

Hi, thanks for your answer, but the days i need are in median, not total

Ritaf1983
Super User
Super User

Hi @alice11987 
Yes.

You need to cluster your medians into groups by median and then put them on the chart by ranges.
Here is a link to a tutorial for making needed segmentations ( in your case by duration)

 https://hacksfordataanalysis.com/2020/08/19/group-by-range-2-ways-to-group-data-in-power-bi/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors