Forum Discussion
Lorenzo
Jul 15, 2023Silver Contributor
DAX: Count items if a condition is met
Hi Relates to Counting with multiple criteria. Looked at a PowerPivot option and whilst it appears to work it seems overcomplicated to me and probably not efficient In Table1 we have...
- Jul 15, 2023
Not sure about efficiency, as variant
Available:=COUNTROWS ( FILTER ( VALUES ( Table1[Name] ), CALCULATE ( COUNTROWS ( DISTINCT ( Table1 ) ), ALL ( Table1[Certification] ) ) > 1 ) ) Total Available:=IF ( HASONEVALUE ( Table1[Certification] ), [Available], SUMX ( VALUES ( Table1[Certification] ), [Available] ) )
which gives