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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors