Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

powerbi filter help - select mutually exclusive records

Hi  I have following table.   Customer No Product 1 A 1 B 1 C 2 A 2 C 3 A 4 A 5 B 6 A     I want to create a measure so if the user selects A, it will...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    Again, you need to prepare an unconnected table for the slicer:

    And create a new measure like:

    Measure = 
    VAR __slicer = ALLSELECTED('DimProduct'[Product])
    VAR __result = CALCULATE(COUNT('Table'[Customer No]), 'Table'[Product] IN __slicer)
    RETURN
    __result

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group