Forum Discussion

jsuttmann's avatar
jsuttmann
Helper I
3 years ago
Solved

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 ...
  • jgeddes's avatar
    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])
    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.