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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MohannadSh1996
Microsoft Employee
Microsoft Employee

Filtering based on a specific value and any other values

Hi, 

I have a column with many values and the number of values is changing dynamically day by day. 

For example, i have this data:

Id
6rc1234vda_id
5211031330_id
3054029377_id
9611800901_id
2197866822_id
7950801538_id
4966427798_id
1268016850_id
3261882374_id


BTW, the first value is showing for all the dates, so i want to have a filter with two values (6rc1234vda_id and "any other value"), like:

filterid.PNG
Is this applicable and how? 

Thanks in advance.

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

If that first value doesn't change, you could add a Groups column with two buckets (the top one and "other values").  See this link

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning

 

If it does change, you can do it in the query editor too.  Just add an Index column starting from 1, and then add a custom column with this formula

 

= if [Index] =1 then "First Value" else "Other Values"

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Microsoft Employee
Microsoft Employee

If that first value doesn't change, you could add a Groups column with two buckets (the top one and "other values").  See this link

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning

 

If it does change, you can do it in the query editor too.  Just add an Index column starting from 1, and then add a custom column with this formula

 

= if [Index] =1 then "First Value" else "Other Values"

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat, In regard of grouping solution, is it as in the following?
grouping.PNG

Also what if we got a new value in the future, should it considered as "Other"? 

That is correct.  It is up to you if you want to create a group called "Others" (or whatever you want) or use the default Other group.  Any new values would go in the Other if you go with the latter, but you would have to update it if you use the former. 

 

Also, the 2nd approach I mentioned should be pretty robust.  If you want to show that first value, you could adapt the M code to show the actual value instead of "First Value" just replace "First Value" with a reference to the column name (e.g., [ColumnName]).  I can't see the name in the reply window otherwise I would have just typed that.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat, Thanks for the answers!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors