Forum Discussion
Stoo48
9 years agoFrequent Visitor
COUNTIFS Functionality in DAX
Trying to find a DAX equivilent to: ACTIVITY =COUNTIFS([fault_code],[@[fault_code]],[equipment_id],[@[equipment_id]]) Have experimented with COUNT and CALCULATE but can't find a syntax that w...
- 9 years ago
According to your description, you want to count rows which meet the criteria. Right?
You can create a measure like below:
COUNTIFS = CALCULATE ( COUNTROWS ( Table ), FILTER ( Table, Table[fault_code] = fault_code1 && Table[equipment_id] = equipment_id1 ) )Regards,
v-sihou-msft
9 years agoMicrosoft Employee
According to your description, you want to count rows which meet the criteria. Right?
You can create a measure like below:
COUNTIFS =
CALCULATE (
COUNTROWS ( Table ),
FILTER (
Table,
Table[fault_code] = fault_code1
&& Table[equipment_id] = equipment_id1
)
)
Regards,
Katja262373
2 years agoHelper I
Dear v-sihou,
thsnk you for your solution. I've tried to apply your COUNTROWS FILTER combination, but it didn't work for me.. could you advise maybe, what do I do wrong?
thank you in advance for your help!