Forum Discussion

Andrylodra's avatar
Andrylodra
Frequent Visitor
3 years ago
Solved

Distinct count when count of elements are higher than

hello everyone,   I'm trying to do the following with no useful result.   I have to get the list of unique names and their numbers from a column in a table. Furthermore, i have to calculate the t...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Andrylodra ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create measures. 

    Measure = 
    var _a=CALCULATE(MAX('Table'[List]),FILTER('Table',COUNT('Table'[List])>1))
    var _b= DISTINCT('Table'[List])
    return IF(_a in _b ,1,0)
    list count = COUNTROWS(FILTER('Table','Table'[Measure]=1))
    filtered out = CALCULATE(DISTINCTCOUNT('Table'[List]),FILTER(ALLSELECTED('Table'),[list count]<>BLANK()))

    (3) Then the result is as follows.

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.