Forum Discussion

FunWithPowerBI's avatar
FunWithPowerBI
Regular Visitor
5 years ago
Solved

Dynamic count by owner in matrix

 

  • Hi FunWithPowerBI ,

     

    I can't find "Test D" in your first table. So I change the table like so:

    Owner Account Name email Type
    Test A AA ABC E1 T1
    Test A AA BCF E2 T2
    Test B BB DCF E3 T3
    Test B BB xyz E4 T3
    Test C CC mnp E5 T5
    Test D CC DER E6 T2

     

    Then, create a measure like so:

    Count = 
    CALCULATE (
        DISTINCTCOUNT( 'Table'[Name] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Owner] = MAX ( 'Table'[Owner] ) )
    )
    

     

     

     

    Best Regards,

    Icey

     

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

     

1 Reply

  • Icey's avatar
    Icey
    Community Support

    Hi FunWithPowerBI ,

     

    I can't find "Test D" in your first table. So I change the table like so:

    Owner Account Name email Type
    Test A AA ABC E1 T1
    Test A AA BCF E2 T2
    Test B BB DCF E3 T3
    Test B BB xyz E4 T3
    Test C CC mnp E5 T5
    Test D CC DER E6 T2

     

    Then, create a measure like so:

    Count = 
    CALCULATE (
        DISTINCTCOUNT( 'Table'[Name] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Owner] = MAX ( 'Table'[Owner] ) )
    )
    

     

     

     

    Best Regards,

    Icey

     

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