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
RingoMoon
Frequent Visitor

Override normal slicer behavior

So I have a sales data and it can be filtered by organization or industry (each organization has an industry). Now if I have a slicer for organization, I can select an organization and it will filter the sales data to only show the sales data for that specific organization. But I want to override that behavior.

 

When I select an organization in the slicer, instead of showing the sales data for that organization, I want to show instead the sales data for the industry where that organization belongs.

 

How do I achieve this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @RingoMoon ,

 

Here are the steps you can follow:

1. Create measure.

Rank =
RANKX(
    FILTER(ALLSELECTED('Industry table'),'Industry table'[Org_ID]=MAX('Industry table'[Org_ID])&&'Industry table'[Industry Name]<>"Other"),
    CALCULATE(MAX('Industry table'[Industry Name])),,ASC)
Flag =
var _select=SELECTEDVALUE('Organization table'[Name])
var _ID=MINX(FILTER(ALL('Organization table'),'Organization table'[Name]=_select),[ID])
var _min=MINX(ALLSELECTED('Industry table'),[Rank])
return
IF(
    MAX('Industry table'[Org_ID])=_ID&&[Rank]=_min&&MAX('Industry table'[Industry Name])<>"Other",1,0)

2. Result:

When there are both Other and other values in [Industry Name], the smallest of the values other than Other is displayed:

vyangliumsft_0-1694770385380.png

When [Industry Name] is only Other, nothing is displayed:

vyangliumsft_1-1694770385383.png

 

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Hi  @RingoMoon ,

 

Here are the steps you can follow:

1. Create measure.

Rank =
RANKX(
    FILTER(ALLSELECTED('Industry table'),'Industry table'[Org_ID]=MAX('Industry table'[Org_ID])&&'Industry table'[Industry Name]<>"Other"),
    CALCULATE(MAX('Industry table'[Industry Name])),,ASC)
Flag =
var _select=SELECTEDVALUE('Organization table'[Name])
var _ID=MINX(FILTER(ALL('Organization table'),'Organization table'[Name]=_select),[ID])
var _min=MINX(ALLSELECTED('Industry table'),[Rank])
return
IF(
    MAX('Industry table'[Org_ID])=_ID&&[Rank]=_min&&MAX('Industry table'[Industry Name])<>"Other",1,0)

2. Result:

When there are both Other and other values in [Industry Name], the smallest of the values other than Other is displayed:

vyangliumsft_0-1694770385380.png

When [Industry Name] is only Other, nothing is displayed:

vyangliumsft_1-1694770385383.png

 

 

Best Regards,

Liu Yang

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

mussaenda
Super User
Super User

Hi @RingoMoon 

Provide you sample data and expected output

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.