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 August 31st. Request your voucher.
Hello community,
I have a table with these columns below and need to know how many unique employees per qty of hours.
Result should be: 3 employees with 189 hours (A, B, C) and 2 employees with 168 hours (D, E).
This is already a filtered table (by country). Field "hours" is a measure.
I tried Distinctcount with filter, countrows, etc.
THANKS!
Solved! Go to Solution.
Solution:
VAR _ctmax = CALCULATE(DISTINCTCOUNT('table1'[employee]),FILTER('table1','table1'[hours] = 189))
VAR _ctmin = CALCULATE(DISTINCTCOUNT('table1'[employee]),FILTER('table1','table1'[hours] = 168))
Solution:
VAR _ctmax = CALCULATE(DISTINCTCOUNT('table1'[employee]),FILTER('table1','table1'[hours] = 189))
VAR _ctmin = CALCULATE(DISTINCTCOUNT('table1'[employee]),FILTER('table1','table1'[hours] = 168))
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
7 |