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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Shuchita_Jain
New Member

Creating "Others" Category with static category, Not Top N

Hi, 

 

I have a table with 25 categories (Let's just say Apple, Beet, Carrot, Donut, Emu, Fig ....so on). The names are not always going to be same and new name may get added or deleted over the quarters. But I know Apple, Peaches, Grapes and Melon are going to be part of my set and I am only interested to find out the sales data for these categories. I want to show a pie chart or bar chart with only these four categories and rest everything to go in "Others" category. I want a way to keep my fixed category on chart while others can get dynamically updated. How the DAX will work for this?

Thanks for help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Shuchita_Jain ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a calculated column as below:

Category =
IF (
    'Table'[Fruits] IN { "Apple", "Peaches", "Grapes", "Melon" },
    'Table'[Fruits],
    "Others"
)

yingyinr_0-1663053104709.png

2. Create a pie chart and apply the category field on the visual

yingyinr_1-1663053154997.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Shuchita_Jain ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a calculated column as below:

Category =
IF (
    'Table'[Fruits] IN { "Apple", "Peaches", "Grapes", "Melon" },
    'Table'[Fruits],
    "Others"
)

yingyinr_0-1663053104709.png

2. Create a pie chart and apply the category field on the visual

yingyinr_1-1663053154997.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

ValtteriN
Super User
Super User

Hi,

By selecting the "new group" from here:

ValtteriN_0-1662977050310.png

 

You can create such group:

ValtteriN_1-1662977076388.png

ValtteriN_3-1662977308710.png

 

Here my test data has 4 different attributes and I grouped "price 1 and Price 2" to a group and other values are in the other group.


Now if I add a new attribute it will automatically be placed in the other group.

E.g. (price 5)

ValtteriN_2-1662977215227.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




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.

August 2025 community update carousel

Fabric Community Update - August 2025

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