Forum Discussion
Anonymous
4 years agoNot applicable
Measure result based on OR conditions
Hi Community, In the following dataset, I created a measure that counts distinct clients where contact type <> "EM" || val1 <> 'Y'|| val2<>"Y". Measure = CALCULATE ( DISTINCTCOUNT ('Tabl...
- 4 years ago
Hey Anonymous ,
the measure is a little more complex:Measure 2 = var t_not_EM = CALCULATETABLE( VALUES( 'Table'[Client] ) ,'Table'[Contact Type] <> "EM" ) var t_EM = CALCULATETABLE( VALUES( 'Table'[Client] ) ,'Table'[Contact Type] = "EM" ) var notEM = EXCEPT( t_not_EM , t_EM ) var t_VAL1_VAL2 = EXCEPT( CALCULATETABLE( VALUES( 'Table'[Client] ) ,'Table'[Val1] = "N" || 'Table'[Val2] = "N" ) , notEM ) return COUNTROWS( UNION( notEM , t_VAL1_VAL2 ) )
Based on the measure you get this result on a card visual:If you use CONCATENATEX instead of COUNTROWS you will get this on the card visual:
... CONCATENATEX( UNION( notEM , t_VAL1_VAL2 ) , 'Table'[Client] , " | " )The card visual:
Hopefully, this provides what you are looking for.
Regards,
Tom
darshaningale
Resolver II
4 years agoPlease explain why you dont want the below rows ?
If you create a new column ("valid" below) with your filter criteria , it shows 9 clients.
Regards
DI