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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
uj91
Helper I
Helper I

To show other category apart from top 5 in a stacked bar chart

uj91_0-1767930207348.png

Top 5 filter is applied on the bar chart. On Legend there is Platform field and percentage spend is on x-axis. y-axis is blank. 

Percenateg spend = 

 
DIVIDE(
    [Spendl],
    CALCULATE([Spend], ALLSELECTED('Table Name))
)


Any suggestions on how to Add ‘Other’ as the 6th breakout showing the multiple paltforms & corresponding spend percentages

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached file.


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

View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-achippa
Community Support
Community Support

Hi @uj91,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @krishnakanth240@rajendraongole1 and @danextian for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

danextian
Super User
Super User

Hi @uj91 

The “Other” category must physically exist in the model in order to assign it a value. A Top N measure alone is not sufficient, and a calculated column approach isn’t dynamic, since it won’t recalculate the “Other” group as slicers and filters change. You can create a calculated table for that:

Model_Other = 
UNION (
    ADDCOLUMNS ( DISTINCT ( 'Product'[Model] ), "Sort", 1 ),
    ROW ( "Model", "Other", "Sort", 2 )
)

danextian_0-1767959696294.png

Create this measure:

Top 5 Models = 
VAR TopX = 5
VAR TopModels =
    TOPN ( TopX, ALLSELECTED ( 'Product'[Model] ), [Sales Amount], DESC )
VAR ModelsWithGrouping =
    ADDCOLUMNS (
        ALLSELECTED ( 'Product'[Model] ),
        "@Value", [Sales Amount],
        "@Group", IF ( 'Product'[Model] IN TopModels, 'Product'[Model], "Other" )
    )
RETURN
    SUMX (
        FILTER ( ModelsWithGrouping, [@Group] IN VALUES ( Model_Other[Model] ) ),
        [@Value]
    )

danextian_1-1767959919022.gif

 

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.

Thanks !  Can we also make a custom tooltip for the others category showing multiple platforms with their spend % ? 

v-achippa
Community Support
Community Support

Hi @uj91,

 

Yes, a custom tooltip is possible using a report-page tooltip, but it requires explicit DAX. Power bi does not automatically expose grouped members created by dynamic Top N logic inside tooltips.

So by creating a tooltip page and a measure that excludes the Top 5 platforms, you can display a detailed breakdown of all remaining platforms and their spend percentages when hovering over ‘Other’.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @uj91,

 

We wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

rajendraongole1
Super User
Super User

Hi @uj91 - Please check the attached pbix file 

 

Take the reference of the logic used to get the other values

rajendraongole1_0-1767948409819.png

 

Hope this works.

 





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

Proud to be a Super User!





krishnakanth240
Memorable Member
Memorable Member

Hi @uj91 

 

We can not add 'Other' category using TOPN functionality.

 

Using a measure, we can do it.

Rank =

RANKX(ALL( 'Table'[Platform]),[Spend],,DESC)

Platform(Top5 + Other) =

IF([Rank]<=5, SELECTEDVALUE( 'Table'[Platform]),"Other")

Not working. Output getting is blank and other. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.