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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
CM_Mills
Helper II
Helper II

Add 'Other' option to stacked column Graph

Hi,

 

I’m having issues where on a stacked column graph I have too many items in the legend.

 

To solve this I would like to convert any item with under 5% of the total as ‘Other’

 

The legend name in a different table to the values so they will need to link some how in the solution. The value is also a ‘measure’ that has been created.

 

 

Table 1

                ItemLabel

 

Table 2

                ItemValue (Measure)

 

Thank you for any help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CM_Mills ,

 

I created an example using this data:

vkaiyuemsft_0-1728030812299.png

 

Create a calculated column and write down as other if the product is less than 15% of the current country classification.

Column = 
VAR _sum1 =
    CALCULATE (
        SUM ( financials[ Sales] ),
        FILTER (
            ALL ( financials ),
            'financials'[Country] = EARLIER ( 'financials'[Country] )
        )
    )
VAR _sum2 =
    CALCULATE (
        SUM ( financials[ Sales] ),
        FILTER (
            ALL ( financials ),
            'financials'[Country] = EARLIER ( 'financials'[Country] )
                && 'financials'[Product] = EARLIER ( 'financials'[Product] )
        )
    )
RETURN
    IF ( _sum2 >= 0.15 * _sum1, 'financials'[Product], "Other" )

vkaiyuemsft_1-1728030839549.png

 


If the results don't match your expectations. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

 

Best Regards,

Clara Gong

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

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @CM_Mills ,

 

I created an example using this data:

vkaiyuemsft_0-1728030812299.png

 

Create a calculated column and write down as other if the product is less than 15% of the current country classification.

Column = 
VAR _sum1 =
    CALCULATE (
        SUM ( financials[ Sales] ),
        FILTER (
            ALL ( financials ),
            'financials'[Country] = EARLIER ( 'financials'[Country] )
        )
    )
VAR _sum2 =
    CALCULATE (
        SUM ( financials[ Sales] ),
        FILTER (
            ALL ( financials ),
            'financials'[Country] = EARLIER ( 'financials'[Country] )
                && 'financials'[Product] = EARLIER ( 'financials'[Product] )
        )
    )
RETURN
    IF ( _sum2 >= 0.15 * _sum1, 'financials'[Product], "Other" )

vkaiyuemsft_1-1728030839549.png

 


If the results don't match your expectations. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

 

Best Regards,

Clara Gong

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

Kaviraj11
Super User
Super User

Showing the top 5 products and Other row - SQLBI




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

Proud to be a Super User!





Hi, thank you for reviewing but this helps with the other solution but does this by using a set top number of items. I need this work on percentages.

lbendlin
Super User
Super User

Hi, thank you for reviewing but this helps with the other solution but does this by using a set top number of items. I need this work on percentages.

You will not be able to get an exact match with percentages.  You would have to define what "under 5%"  means in your scenario, and there may be no data points satisfying that criteria.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.