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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rashidanwar
Advocate II
Advocate II

Create dynamic groups/categories, to be used as legends in a visual, based on date range slicer

Hi All

I have a table containing 3 columns. trip_date, trip_id and country_name.
I want to create a column chart showing trip month on x-axis and count of trip_id (number of trips) on y-axis.
I have a trip date slicer at the top.

Now if a country has count of trips less than 3 for the selected date range then it shoud be dynamically categorised/grouped to   
"Other" else it shoud be under the country_name. 

For example 
trip_date      trip_id              country_name
1/1/2023      1                      USA
1/2/2023      2                      USA
1/3/2023      3                      USA
1/4/2023      4                      Canada
1/5/2023      5                      Canada
1/6/2023      6                      Canada
1/7/2023      7                      Canada
1/3/2023      8                      Brazil
1/4/2023      9                      Brazil
1/10/2023    10                    Brazil

Output
=> If I select the date range from 1/1/2023 to 1/5/2023 then Brazil and Canada will be grouped under "Others" becasue they have less then 3 trip counts for the selected date range.
=> If I select the date range from 1/3/2023 to 1/8/2023 then USA and Brazil will be grouped under "Others" becasue they have less then 3 trip counts for the selected date range. 

I would appreciate any help in this regards. 

Best Regards
Rashid Anwar

1 REPLY 1
amitchandak
Super User
Super User

@rashidanwar , if think you need a very similar solution, the filter is not on rank measure but on sum of qty measure

Power BI- TOPN with Others- https://youtu.be/I_TY4hVlzAE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.