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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aicms91
Frequent Visitor

Power BI - Ignore slicer but keep its selection

I have created a slicer (slicer 1) that shows only my company's products, with the remaining grouped in "Others".

Slicer 1

  • Product A
  • Product B
  • Others

Each Product is associated with a different Market. If I select one product it will automatically select a Market. Example: Product A filters for Market X; Product B filters for Market Y; so on.

I would like to have a table that shows all Product A competitors' in Market X. I haven't been able to create a measure that ignores the selection in Slicer 1 (so it doesn't only show Product A, Product B, ... in the table) but keeps it associated market. I would like to have something like this:

Selecting Product A in Slicer 1

Market X Performance

  • Product A Sales €€
  • Competitor AA Sales €€
  • Competitor AB Sales €€

Selecting Product B in Slicer 1

Market Y Performance

  • Product B Sales €€
  • Competitor BB Sales €€
  • Competitor BC Sales €€

Any tips?


Many thanks,

AS

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @aicms91 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a product dimension table

Products = VALUES('Table'[Product]) 

yingyinr_1-1665382084818.png

2. Create a measure as below to judge if the current product should display or not:

Flag =
VAR _selproducts =
    ALLSELECTED ( 'Products'[Product] )
VAR _market =
    CALCULATETABLE (
        VALUES ( 'Table'[Market] ),
        FILTER ( ALLSELECTED ( 'Table'[Product] ), 'Table'[Product] IN _selproducts )
    )
VAR _products =
    CALCULATETABLE (
        VALUES ( 'Table'[Product] ),
        FILTER ( 'Table', 'Table'[Market] IN _market )
    )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[Product] ) IN _products, 1, 0 )

3. Create a table visual and apply the visual-level filter with the condition(Flag is 1)

yingyinr_0-1665382009796.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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
v-yiruan-msft
Community Support
Community Support

Hi @aicms91 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Create a product dimension table

Products = VALUES('Table'[Product]) 

yingyinr_1-1665382084818.png

2. Create a measure as below to judge if the current product should display or not:

Flag =
VAR _selproducts =
    ALLSELECTED ( 'Products'[Product] )
VAR _market =
    CALCULATETABLE (
        VALUES ( 'Table'[Market] ),
        FILTER ( ALLSELECTED ( 'Table'[Product] ), 'Table'[Product] IN _selproducts )
    )
VAR _products =
    CALCULATETABLE (
        VALUES ( 'Table'[Product] ),
        FILTER ( 'Table', 'Table'[Market] IN _market )
    )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[Product] ) IN _products, 1, 0 )

3. Create a table visual and apply the visual-level filter with the condition(Flag is 1)

yingyinr_0-1665382009796.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

This is brilliant, it worked! THANK YOU so so much!!! 😀

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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