Forum Discussion
jsuttmann
3 years agoHelper I
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 ...
- 3 years ago
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.
jgeddes
3 years agoSuper 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])
Return
IF(
_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.