The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a dataset where I want to create two measures, one is the total count of employees and the other is the total count of employees who are on a particular assignment. I know would have to use the countx(filter()) functions to the latter, but I am not sure how to make the count distinct while using countx. How would this be accomplished?
Solved! Go to Solution.
Total Employees = DISTINCTCOUNT ( Table[Employee] )
Total Employees (on Assignment X) =
CALCULATE (
[Total Employees],
FILTER ( Table, Table[Assignment] = "Assignment X" )
)
Hope this helps!
Total Employees = DISTINCTCOUNT ( Table[Employee] )
Total Employees (on Assignment X) =
CALCULATE (
[Total Employees],
FILTER ( Table, Table[Assignment] = "Assignment X" )
)
Hope this helps!
Yup, thanks!
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
112 | |
81 | |
65 | |
48 | |
38 |