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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
OpenRoad
New Member

Filter Dataset by Secondary Column Only

I'm trying to figure out how to filter a dataset to by a secondary column only.

In Excel the non-optimal workaround is to have two slicers (eg. one for store and one for product and after selecting the store, set the second slicer to select multiple and use a shift click to multi-select all the products then remove the store slicer. In PowerBI the shift click method does not work and the number of products is too large to quickly select by clicking on individually. How can I set it up to filter the dataset by a secondary column only?

For example:

 

Data Table  
   
StoreProductSales
Steve's AutoTires10
Steve's AutoOil4
Rachael's AutoTires9
Rachael's AutoBrakes12
Jeff's AutoBrakes4
Jeff's AutoOil3
   
   
Slicer1  
Steve's Auto<-- Selected Steve's Auto
Rachael's Auto  
Jeff's Auto  
   
   
Resulting Table (Products Steve's Auto Sells)
   
StoreProductSales
Steve's AutoTires10
Steve's AutoOil4
Rachael's AutoTires9
Jeff's AutoOil3

 

Thanks!

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

 

Hi, @OpenRoad

 

You could not achieve your goal if you do this in one table. Creating another table would make this easier.

1. Create a new table with only stores. (Copy the table, keep just column STORE, delete duplicates. )

2. Delete the relationship if Power BI creates it automatically.

3. Create a measure like this.

Measure =
IF (
    HASONEVALUE ( 'DataTable2'[Store] ),
    IF (
        MIN ( 'DataTable'[Product] )
            IN CALCULATETABLE (
                VALUES ( 'DataTable'[Product] ),
                FILTER (
                    ALL ( 'DataTable' ),
                    'DataTable'[Store] = VALUES ( DataTable2[Store] )
                )
            ),
        "y",
        BLANK ()
    ),
    0
)

 

Hope this would be a little help.

 

Capture02.JPG 

 

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

@OpenRoad

 

Hi,

 

Did it work? What else can I do for you?

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
OpenRoad
New Member

Also, attempts to use a ALL command on the 'store' column have been met with data type errors.

OpenRoad
New Member

So far I've been able to still return the total number of Product Sales for all Store's while only showing products for the selected store by using Measure = Calculate(sum(Table[Sales]),all(Table[Stores])) but have not been able to have the other relevant Stores appear in the table.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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
Top Kudoed Authors