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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ChrisAZ
Helper V
Helper V

Wanting to group smaller pie slices together to unclutter the view

I had seen some previous questions around this, but could not find a solution that seemed to match or meet what I am hoping to do. I would like to be able to have Service Tasks that are say under 3% get grouped into an "Other" group. These will vary from individual and time period so it needs to be dynamic in that way. What might be the most logical way to do this? Thanks!

 

 

22 REPLIES 22
ChrisAZ
Helper V
Helper V

Wondering what protocol is on these forums if you don't get a solution that seems to work from a post and other individuals stop responding. Is it OK to start a new thread looking for assistance and indicate what I have already tried?

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached files.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @ChrisAZ 

 

If you want it dynamic such that you use use Other in the legend, use a disconnected table has a column containing the distinct tasks and the word other.

danextian_0-1735128012421.png

Write a measure that temporarily stores the percentage for each distinct tasks, add a column that returns other if the percentage <3% and use that column to filter the temporary table.

Sales_Other =
VAR SubcatOther =
    VALUES ( SubcategoryOther[Subcategory] )
VAR _tbl =
    ADDCOLUMNS (
        SUMMARIZECOLUMNS (
            'Product'[Subcategory],
            "@Sales", [Sales],
            "@Sales%", [Sales %]
        ),
        "@Subcategory", IF ( [@Sales%] < 0.03, "Other", [Subcategory] )
    )
VAR _filtered =
    FILTER ( _tbl, [@Subcategory] IN SubcatOther )
RETURN
    SUMX ( _filtered, [@Sales] )

 

danextian_1-1735128337670.png

Please see the attached sample pbix.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Kedar_Pande
Super User
Super User

@ChrisAZ 

Create a Measure

Task Percentage = 
DIVIDE(
SUM('Table'[TaskValue]),
CALCULATE(SUM('Table'[TaskValue]), ALL('Table'[Service Task]))
)

Create a New Column

Grouped Task = 
IF(
[Task Percentage] < 0.03,
"Other",
'Table'[Service Task]
)

Replace the original Service Task field in your visuals with the Grouped Task column. This will dynamically combine smaller tasks into an "Other" category.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Thank you. What do I replace the "TABLE" portion with?

Anonymous
Not applicable

Thanks for the reply from olgad  and Kedar_Pande , please allow me to provide another insight:

Hi,@.
Thanks for reaching out to the Microsoft fabric community forum.

Based on your requirements, I have proposed three solutions:

I created the following test data:

vlinyulumsft_0-1735104540412.png

1.Firstly, the calculated table you mentioned:

vlinyulumsft_1-1735104540413.png

other = 
VAR ta1 =
    SUMMARIZE (
        'Table',
        'Table'[TaskName],
        'Table'[Value],
        "percent", DIVIDE ( 'Table'[Value], CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) ) )
    )
RETURN
    FILTER ( ta1, [percent] < 0.03 )

Here is the final result:

vlinyulumsft_2-1735104585158.png

 

2.Secondly, measures:

vlinyulumsft_3-1735104585158.png

MEASURE =
VAR Task_Percentage1 =
    DIVIDE (
        SUM ( 'Table'[Value] ),
        CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )
    )
RETURN
    IF ( Task_Percentage1 < 0.03, "Other", MAX ( 'Table'[TaskName] ) )

Here is the final result:

vlinyulumsft_4-1735104607348.png

3.Lastly, calculated columns:

vlinyulumsft_5-1735104607349.png

Grouped Task =
VAR Task_Percentage =
    DIVIDE ( 'Table'[Value], CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) ) )
RETURN
    IF ( Task_Percentage < 0.03, "Other", 'Table'[TaskName] )

Here is the final result:

vlinyulumsft_6-1735104633176.png

You can choose any of these solutions based on your needs.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

 

So I want to try one of these solutions, but I noticed all of the suggestions seem to be using the DIVIDE approach to get to a percentage. I do not need to calculate the percentages, I already have them showing in the pie chart for each Task. I really just need to create a way to lump certain ones that make up less than a certain % into one "Other" group.

olgad
Super User
Super User

First calculate the percentage:

 

TaskPercentage =
DIVIDE(SUM('ServiceTasks'[Value]), calculate(SUM('ServiceTasks', 'ServiceTasks'[Value]), Allselected('ServiceTasks')) 

Then:

TaskCategory =
IF(
[TaskPercentage] < 0.03,
"Other",
'ServiceTasks'[TaskName]
)

 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Pardon my ignorance, so I do these as Calculated Tables or measures?

The first one is a measure, the second is a column


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Thanks. So I was able to create this measure and the column, but the issue is that it is doing the calculation based on each individual task in my list, and I need it to be against the total of each of those tasks in a displayed period of time. For example, the ones listed as Freight Truck PM will be aggregated to a total for that service task in the pie chart. Only when the overall percent to that task is less than 3% do I want it to be put into "Other"

 

Screenshot 2024-12-31 091554.png

@olgad Hi there, was just wondering if you saw my follow up and had any additional ideas?

Hi @ChrisAZ 

Just checking if you have tried the approach in my initial response? That does dynamically aggregate items to others based on certain conditions.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

No, I am sorry but I am unable to follow your suggested solution so I have been trying this other way.

There is a sample pbix in my initial post. If you want certain categories to appear as other in your pie chart based on certain conditions, you will need to use a physical table to materialize the result. You can't use measures as they cannot be used as dimensions while a calculated column approach will not be dynamic.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks. So I did give this a try. I was able to create the corresponding Table, but it won't accept my syntax for the Measure and I am not sure what I have incorrect. I am obviously modifying the content you shared to fit my data/fields.

Screenshot 2025-01-09 095504.pngScreenshot 2025-01-09 095424.png

@danextian Wondering if you had a chance to review this latest result? Thanks!

Also open to other people's input if they have any ideas on how to get this to the finish line. Thanks!

Hi, I see your problem.
Please, adjust your measure for 

TaskPercentage =
DIVIDE( calculate(SUM('ServiceTasks'[Value]), ALLEXCEPT('ServiceTasks', ServiceTasks[TaskName])), calculate(SUM('ServiceTasks'[Value]), Allselected('ServiceTasks')))

Pie chart shows you the % automatically, but in order to label something as other, you need to calculate those percentages. This formula will do exactly that. 
Before:
 olgad_0-1736367803858.png

After: 

olgad_1-1736367851453.png

 






DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

I redid the calculation, but where do I add it for the pie chart? I can't seem to get it to display properly.

 

Screenshot 2025-01-08 160825.png

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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