Forum Discussion

gambleave's avatar
gambleave
Helper II
3 years ago
Solved

Countrows based on distinct field

Hi, I have the below measure to count the number of records in the table "Employee Vote" where  the Role is indicated as Sales and the Region is Europe.    Count Europe Sales Votes =  CALCULATE(C...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please try the below whether it suits your requirement.

     

     

    Count Europe Sales Name =
    CALCULATE (
        COUNTROWS ( DISTINCT ( 'Employee Vote'[Employee Name] ) ),
        FILTER (
            'Employee Vote',
            'Employee Vote'[Role] = "Sales"
                && 'Employee Vote'[Region] = "Europe"
        )
    )