Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I am new with power BI and I need help to perform a calculation.
For each worker I have the number of transactions (Trx Equivalent) that he made by date and time range and the goal he should have reached.
ID_EMP | DATE | HOUR | TRX | GOAL |
123 | 01/01/2017 | 7 | 38 | 38 |
123 | 01/01/2017 | 8 | 33 | 38 |
123 | 01/01/2017 | 9 | 37 | 38 |
123 | 02/01/2017 | 7 | 39 | 38 |
123 | 02/01/2017 | 8 | 41 | 38 |
123 | 03/01/2017 | 7 | 38 | 38 |
874 | 01/01/2017 | 7 | 30 | 38 |
874 | 01/01/2017 | 8 | 37 | 38 |
874 | 01/01/2017 | 9 | 41 | 38 |
874 | 02/01/2017 | 7 | 43 | 38 |
874 | 02/01/2017 | 8 | 40 | 38 |
333 | 01/01/2017 | 7 | 44 | 38 |
333 | 01/01/2017 | 8 | 47 | 38 |
333 | 03/01/2017 | 7 | 45 | 38 |
333 | 03/01/2017 | 8 | 40 | 38 |
645 | 01/01/2017 | 7 | 37 | 38 |
645 | 01/01/2017 | 8 | 37 | 38 |
645 | 02/01/2017 | 7 | 37 | 38 |
645 | 03/01/2017 | 7 | 45 | 38 |
I have a calculation that tells me if it meets expectations or not
PROD = if (SUM ('Table' [TRX]) / SUM ('Table' [GOAL])> 1; 1; SUM ('Table' [TRX]) / SUM ('Table' [GOAL]))
I have several tables and filters that show me the data in different levels of opening.
Now, I want to count the amount of different ID_EMPs in which PROD is> = 1. For example:
In this case, considering all dates, the count is 2
ID_EMP | Sum TRX | Sum GOAL | PROD |
123 | 226 | 228 | 99% |
333 | 176 | 152 | 100% |
645 | 150 | 152 | 99% |
874 | 191 | 190 | 100% |
In this case, filtering the date and leaving only 01/01/2017, the count is 1
ID_EMP | Sum TRX | Sum GOAL | PROD |
123 | 108 | 114 | 95% |
333 | 91 | 76 | 100% |
645 | 72 | 76 | 95% |
874 | 108 | 114 | 95% |
How to do that count?
Thanks!
Solved! Go to Solution.
Give this a try
Measure = COUNTX ( FILTER ( ALLSELECTED ( Table1[ID_Emp] ), [PROD] = 1 ), 1 )
Give this a try
Measure = COUNTX ( FILTER ( ALLSELECTED ( Table1[ID_Emp] ), [PROD] = 1 ), 1 )
Wonderful. It works perfect. Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |