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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rashidanwar
Helper III
Helper III

Dynamic Categorization Based on Value in a Stacked Column Chart

Hi Everyone

Challenge: I created a stacked column chart visualizing monthly order counts by city. Each column represents total orders for a month, broken down by individual cities in the legend. However, there are numerous cities with order counts consistently below 5 per month.

Goal: I want to group these low-volume cities (order count < 5) under a single category named "Others" in the chart legend. This should be dynamic and adapt to any slicer selections applied to the report.

Additional Context: The chart displays data on a monthly basis with order counts on the y-axis and months on the x-axis. The legend currently shows individual city names.

I would appreciate any help!

Thank you!
Rashid Anwar

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rashidanwar ,

Below is my table:

vxiandatmsft_0-1713488886145.png

The following DAX might work for you:

City1 = IF('Table'[Data] < 5,"Other",'Table'[City]) 

The final output is shown in the following figure:

vxiandatmsft_1-1713488972438.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @rashidanwar ,

Below is my table:

vxiandatmsft_0-1713488886145.png

The following DAX might work for you:

City1 = IF('Table'[Data] < 5,"Other",'Table'[City]) 

The final output is shown in the following figure:

vxiandatmsft_1-1713488972438.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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