Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello dear Power-BI-Community
Following problem to solve:
Let's assuem this table:
| Person | Check |
| A | 1 |
| A | 0 |
| A | 0 |
| B | 0 |
| B | 0 |
| C | 1 |
| C | 1 |
| D | 0 |
| D | 0 |
| D | 0 |
People must carry out checks.
Person A, for example, has to carry out the check 3x (1x done so far).
Person B has to carry out the check 2x (0x done so far)
And so on...
The aim is to use a measure to calculate how many people have not yet carried out a check.
Solution to this would be 2 (Person B & D)
Thank you very much for your contribution.
Cheers
qwertzuiop
Solved! Go to Solution.
As @Syk , suggested, this is easiest done in two steps. I would do it this way.
Create a new Calculated Column:
TotalChecks = CALCULATE( SUM(Checks[Check] ),
ALLEXCEPT( Checks, Checks[Person] ))
PersonCheckTotalChecks
| A | 1 | 1 |
| A | 0 | 1 |
| A | 0 | 1 |
| B | 0 | 0 |
| B | 0 | 0 |
| C | 1 | 2 |
| C | 1 | 2 |
| D | 0 | 0 |
| D | 0 | 0 |
| D | 0 | 0 |
Then create a new Measure:
0_Checks = CALCULATE( DISTINCTCOUNT( Checks[Person] ),
FILTER( Checks, Checks[TotalChecks] = 0 ))
Trust this works for you.
Regards,
As @Syk , suggested, this is easiest done in two steps. I would do it this way.
Create a new Calculated Column:
TotalChecks = CALCULATE( SUM(Checks[Check] ),
ALLEXCEPT( Checks, Checks[Person] ))
PersonCheckTotalChecks
| A | 1 | 1 |
| A | 0 | 1 |
| A | 0 | 1 |
| B | 0 | 0 |
| B | 0 | 0 |
| C | 1 | 2 |
| C | 1 | 2 |
| D | 0 | 0 |
| D | 0 | 0 |
| D | 0 | 0 |
Then create a new Measure:
0_Checks = CALCULATE( DISTINCTCOUNT( Checks[Person] ),
FILTER( Checks, Checks[TotalChecks] = 0 ))
Trust this works for you.
Regards,
Hello @Syk
First of all - thank you very much for your support.
Unfortunately it is not yet solved.
With your measure, I count the distinct sum of people who have at least 1x 0.
In the table above it would be the person A,B,D based on your measure.
Person A should not to be counted because it has already carried out a control.
Goal is: Count the number of people who have not yet carried out any check.
Any ideas?
You can create a measure to sum your checks and then another to check for sum < 1. (You could also skip the first measure if your column is already summed)
It would be something like...
people_not_checked = CALCULATE(DISTINCTCOUNT('Table'[Person]),'Table'[Check]<1)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 118 | |
| 106 | |
| 38 | |
| 28 | |
| 27 |