Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everybody!
i'm new at Power BI and i need to know how to split a count of some values in a range of 4 levels to be displayed in a donut charts.
i'll try to be more clear: Donut example
focus just to the legend PERC, i created a column with those 4 value as a visual legend but now i need to count some values (based on their values, for example the count of the values between 0 and 5000 should be inserted into first group, and so on).
can you tell me how to do it?
Thanks a lot
Solved! Go to Solution.
Hi @Anonymous
These two articles explain how to do it.
https://www.daxpatterns.com/static-segmentation/
https://www.daxpatterns.com/dynamic-segmentation/
Hi @Anonymous ,
Create a calculated column to count each group,similarly as below:
Count = CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[Grouping values]))
Then put the count column in the field of legend,choose "expand all down one level in the hierarchy" ,see below :
And you will see:
I made a sample .pbix file which you can refer to,pls click here.
Hi @Anonymous ,
If you hope the total number appears in the center of donut,I have a workaround for:
1. Create a measure as below:
overall = COUNTROWS('Table')
2. Put the measure in a card visual:
Set : category->off, title >On,writing "Overall" in title field
Then select card and donut, click on "card"+ctrl +right click on donut,choose "group",as shown below:
And you will see:
I have modified the .pbix file,pls click here.
Hi @Anonymous
These two articles explain how to do it.
https://www.daxpatterns.com/static-segmentation/
https://www.daxpatterns.com/dynamic-segmentation/
Thanks!
I solved the first part, now i would ask how can i show the number of each count near the legend:
https://imgur.com/UYTqZEi
Hi @Anonymous ,
Create a calculated column to count each group,similarly as below:
Count = CALCULATE(COUNTROWS('Table (2)'),ALLEXCEPT('Table (2)','Table (2)'[Grouping values]))
Then put the count column in the field of legend,choose "expand all down one level in the hierarchy" ,see below :
And you will see:
I made a sample .pbix file which you can refer to,pls click here.
Amazing! Thanks a lot @v-kelly-msft !
May i ask you just a couple of minor things before closing the request?
1) Is there a way to outdistance the number of count from the range value? Maybe with a -? Because with just a space character it's a bit chaotic. SOLVED
2) Is there a way to show the overall(the total sum of all count) inside the donut? i'll show a picture with these ideas
Hi @Anonymous ,
If you hope the total number appears in the center of donut,I have a workaround for:
1. Create a measure as below:
overall = COUNTROWS('Table')
2. Put the measure in a card visual:
Set : category->off, title >On,writing "Overall" in title field
Then select card and donut, click on "card"+ctrl +right click on donut,choose "group",as shown below:
And you will see:
I have modified the .pbix file,pls click here.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |