Forum Discussion
Calculate Count formula
- 5 years ago
CALCULATE(COUNT('Report1'[Educate employees]),'Report1'[Educate employees]>=5 && 'Report1'[Educate employees]<=7)
the && functions as an AND when turning to SQL, which means the filter has to pass BOTH criteria
| Educate employees |
| 4 |
| 99 |
| 7 |
| 5 |
| 7 |
| 7 |
| 7 |
| 6 |
| 7 |
this is the formula im using, but doing it this way also includes the '99' which i don't want...
- decarsul5 years agoHelper V
CALCULATE(COUNT('Report1'[Educate employees]),'Report1'[Educate employees]>=5 && 'Report1'[Educate employees]<=7)
the && functions as an AND when turning to SQL, which means the filter has to pass BOTH criteria
- Anonymous5 years agoNot applicable
That works, but for some reason, the result that's coming through isn't correct, so it's like a source data issue. I will keep investigating. Thanks
- Anonymous5 years agoNot applicable
I think i know why it's not giving me the answer it should be....i think the divide formula is also including the '99s' as part of the total, which I want to exclude from the overall calculation
Percent 5-7 Educate Employees =DIVIDE([Count of 5-7 Educate Employees],COUNT('Report 1'[Educate employees])is what I have currently...
- decarsul5 years agoHelper V
Can create a seperate column and do a sum on that.
=IF(AND('Report1'[Educate employees] >= 5;'Report1'[Educate employees] <= 7);1;0)
This will return a value of 1 when its between 5 and 7, and value of 0 when its not, and will do this on each row.
Then you can just SUM() the new column