Forum Discussion

aicms91's avatar
aicms91
Frequent Visitor
4 years ago
Solved

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 differen...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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]) 

    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)

     

    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