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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
tt211595
Frequent Visitor

Bar chart with selected categories + "Other" bar

Hello, I'm trying to create a bar chart showing counts by category (for selected categories) and a bar for "Other" for unselected categories.

 

If I have this table called SampleTable:

IDCountry
1Germany
2France
3Germany
4India
5China
6Ghana

 

If I were to create a bar chart with counts for each country, there would be 5 bars (Germany, France, India, China, Ghana) showing counts (each bar is 1 except Germany, which is 2). 

 

I would like to create a dropdown slicer based on VALUES(SampleTable[Country]) so that the user can select countries. If the user selects Germany and India from the dropdown, I would like the bar chart to show 3 bars: Germany (count value = 2), India (value = 1), and Other (value = 3), where Other represents the count for the unselected countries combined.

 

Is this possible? I am able to group the selected countries into a single bar and the un-selected countries into a single bar, but I would like to show a bar for each of the selected countries (instead of combining those). Thank you!!

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @tt211595 ,

 

this is not a simple task, but you can use this article to find some modeling guidance: Showing the top 5 products and Other row - SQLBI

 

I also wrote an article TopSomething and all the rest called "other" - Mincing Data - Gain Insight from Data (minceddata.inf...

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar problem in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1717555693475.png

 


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

Hi @tt211595 ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
TomMartens
Super User
Super User

Hey @tt211595 ,

 

this is not a simple task, but you can use this article to find some modeling guidance: Showing the top 5 products and Other row - SQLBI

 

I also wrote an article TopSomething and all the rest called "other" - Mincing Data - Gain Insight from Data (minceddata.inf...

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.