Forum Discussion
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 only show the count who has only product A. if they select A & B, it will only show the count of users who have either product A or B or both.
- Anonymous2 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 __resultBest Regards,
Gao
Community Support TeamIf 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
3 Replies
- hansontm
Resolver I
Create new measure Num_Customers = DISTINCTCOUNT('Table'[Customer No]) - AnonymousNot applicable
actully it is not correct. When I select A, I need to see all the users that has ONLY product A
- AnonymousNot applicable
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 __resultBest Regards,
Gao
Community Support TeamIf 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