Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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(COUNTROWS('Employee Vote'), FILTER(FILTER('Employee Vote', Employee Vote[Role]="Sales"), 'Employee Vote'[Region]="Europe"))
Additionally, I would like to count only distinct records by an "Employee Name" column in the same table. How can I modify the syntax to achieve this? Thank you.
Solved! Go to Solution.
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"
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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"
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thanks very much, this works fine.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |