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
kamiluc
Helper I
Helper I

Create a slicer that filters based on alternate column

Hi there,

 

I need to create a slicer that will filter my output based on a column different from the one in the slicer.  In the example below, my slicer should be on the column "Product", and my output needs to give me every Store and Product that contains that product.

 

kamiluc_0-1730095913429.png

 

I tried creating a summarized table with the combinations for Store and Product, then created a relationship from that summary table to Table1 via the "Store", and used "Product" in the slicer.  This ends up being a many-to-many, which I thought it'd be okay in this context, but that didn't seem to work in my model.

 

Any help is greatly appreciated!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @kamiluc ,

 

not sure if i fully get you, supposing your table named data, try like:

 

1) plot a slicer with a calculated table like:

data2 = VALUES(data[Product])

 

2) pull a measure like below to the filter pane of your original table visual and select 1:

measure = 
VAR _product = SELECTEDVALUE(data2[product])
VAR _list = 
CALCULATETABLE(    
    VALUES(data[product]),
    REMOVEFILTERS(data[product])
)
VAR _result = IF(_product IN _list, 1, 0)
RETURN _result

 

it worked like:

FreemanZ_0-1730098110170.png

 

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @kamiluc ,

 

not sure if i fully get you, supposing your table named data, try like:

 

1) plot a slicer with a calculated table like:

data2 = VALUES(data[Product])

 

2) pull a measure like below to the filter pane of your original table visual and select 1:

measure = 
VAR _product = SELECTEDVALUE(data2[product])
VAR _list = 
CALCULATETABLE(    
    VALUES(data[product]),
    REMOVEFILTERS(data[product])
)
VAR _result = IF(_product IN _list, 1, 0)
RETURN _result

 

it worked like:

FreemanZ_0-1730098110170.png

 

Thank you @FreemanZ ! Didn't work at first for me because my model was actually a bit more complex from the example I provided, but with slight modifications I was able to use your solution. 🙂 

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.