Forum Discussion
Slicer Based on Count
I need help building a slicer that is based on a count of transactions per user. My dataset has a column of users and a column of transaction IDs. I have a visual showing all the distinct users in my dataset and a count of transaction IDs associated to each user. I want to build a slicer that allows me to define a minimum count of transaction IDs to display in the visual. For example, if my slicer is set to a minimum count of 3 transaction ID, my visual would exclude users with counts of 1 or 2 transaction IDs.
You could accomplish this with a parameter.
For example if I want to limit the count of services from my table
I can create a parameter named "Minimum TXs" and then write my measure as follows
Count of Services =var _serviceCount =COUNT(clientTable[ServiceName])var _minTXs ='Minimum TXs'[Minimum TXs Value]var _table =FILTER(clientTable, clientTable[ServiceName])ReturnIF(_serviceCount >= 'Minimum TXs'[Minimum TXs Value],SUMX(FILTER(SUMMARIZE(clientTable, clientTable[Client_Name], "_count", COUNT(clientTable[ServiceName])), [_count] > 'Minimum TXs'[Minimum TXs Value]),[_count]),BLANK())I would then end up with
Hope this points you in the right direction.
1 Reply
- jgeddesSuper User
You could accomplish this with a parameter.
For example if I want to limit the count of services from my table
I can create a parameter named "Minimum TXs" and then write my measure as follows
Count of Services =var _serviceCount =COUNT(clientTable[ServiceName])var _minTXs ='Minimum TXs'[Minimum TXs Value]var _table =FILTER(clientTable, clientTable[ServiceName])ReturnIF(_serviceCount >= 'Minimum TXs'[Minimum TXs Value],SUMX(FILTER(SUMMARIZE(clientTable, clientTable[Client_Name], "_count", COUNT(clientTable[ServiceName])), [_count] > 'Minimum TXs'[Minimum TXs Value]),[_count]),BLANK())I would then end up with
Hope this points you in the right direction.