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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RSSILVA_22
Helper I
Helper I

Top N plus others

I have a stacked 100% bar chart with "period" on the Y-axis, a simple measure with the sum of values on the X-axis, and "Plan" in the legend.

My challenge is: I need to create a chart that shows the top 5 plans, while the remaining plans should be classified as "Others".

The table has other fields, and in the example I posted, the group field is used as a filter in my report. Therefore, the classification of the top 5 plans + others needs to be dynamic based on the filter applied by the user on the dashboard.

Does anyone have a suggestion for a measure or any other solution for this scenario?

Thank you in advance.

 

Arquivo pbix

 

img 1.PNG

2 REPLIES 2
Martin_D
Super User
Super User

This is the solution you need: https://www.youtube.com/watch?v=JLK2e0k8OBE

The key is to build a second table that consists of the plano values plus one more row with value "Other", then build a one to many relationship from new plano table to existing table and write the measure like in the video to sum all others in the others category.

 

// Create new calculated table
plano = UNION ( ROW ( "plano", "Other"), VALUES ( 'teste'[plano] ) )

 

 

In my source file, I already have a relationship with another table involving the same field that doesn't allow me to relate the two, which is a great solution, but it was not applicable in the production file.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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