Forum Discussion
Anonymous
5 years agoNot applicable
How to do a Count IF with condition using measure?
Hello, I need to get a count of employee numbers that are greater than 0 on Average variance, but I am getting an error. Can anybody please help me how to fix it? Avg_Daily_Var._ % = IFERROR(...
- 5 years ago
Hi,
Try these measures:
Avg_Daily_Var._ % = DIVIDE([Avg_Daily_Submitted],[Avg_Daily_Reqquired],0)CountEmp# = COUNTROWS(FILTER(VALUES(Employee[firstlast]),[Avg_Daily_Var._ %] >0.0))Hope this helps.
- 5 years ago
Anonymous , you might want to try
CountEmp#_2 = COUNTROWS ( FILTER ( VALUES ( Employee[firstlast] ), [Avg_Daily_Var._ %] < 0.0 && [Avg_Daily_Var._ %] > -0.10 ) )or equally
CountEmp#_2 = COUNTROWS ( FILTER ( VALUES ( Employee[firstlast] ), AND ( [Avg_Daily_Var._ %] < 0.0, [Avg_Daily_Var._ %] > -0.10 ) ) )
Ashish_Mathur
5 years agoSuper User
Hi,
Try these measures:
Avg_Daily_Var._ % = DIVIDE([Avg_Daily_Submitted],[Avg_Daily_Reqquired],0)CountEmp# = COUNTROWS(FILTER(VALUES(Employee[firstlast]),[Avg_Daily_Var._ %] >0.0))
Hope this helps.
Anonymous
5 years agoNot applicable
HI, thank you so much. This is the one I am looking for but what happens if I have more than one argument. Please see below
CountEmp#_2 = COUNTROWS(FILTER(VALUES(Employee[firstlast]),([Avg_Daily_Var._ %] < 0.0 AND [Avg_Daily_Var._ %] > -0.10))I tried it, did not work. Can you please tell me how to add more than 1 condition on measures?
Thank you so much
- CNENFRNL5 years agoCommunity Champion
Anonymous , you might want to try
CountEmp#_2 = COUNTROWS ( FILTER ( VALUES ( Employee[firstlast] ), [Avg_Daily_Var._ %] < 0.0 && [Avg_Daily_Var._ %] > -0.10 ) )or equally
CountEmp#_2 = COUNTROWS ( FILTER ( VALUES ( Employee[firstlast] ), AND ( [Avg_Daily_Var._ %] < 0.0, [Avg_Daily_Var._ %] > -0.10 ) ) )- Anonymous5 years agoNot applicable
Awesome, thank you so much for the help.