Forum Discussion
Anonymous
8 years agoNot applicable
Count If in Power BI
Hi everyone. I'm want calculate like count if excel in power BI, but my sentence is not ok. I'm try create another measure, but this count all register for each operator. MeasureCountIf = CALCU...
Anonymous
8 years agoNot applicable
Hello Xiaxoin, thanks for your reply.
I used your solution for AND, but not solve. When i put this measure, not appear all my operator.
Appear only one.
Anonymous
8 years agoNot applicable
Hi Anonymous,
Is there any summary on your records? AFAIK, SELECTEDVALUE function not works on summary records.
If this is a case, you need to use other functions to get current row contents.
And Logic =
VAR currOpe =
FIRSTNONBLANK ( Table[Operator]; [Operator] )
VAR currSer =
MAX ( Table[Serial Number] )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( Table );
Table[Operator] = currOpe
&& Table[Serial Number] = currSer
)
)
Or Logic =
VAR currOpe =
FIRSTNONBLANK ( Table[Operator]; [Operator] )
VAR currSer =
MAX ( Table[Serial Number] )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( Table );
Table[Operator] = currOpe
|| Table[Serial Number] = currSer
)
)
Regards,
Xiaoxin Sheng