Forum Discussion
Anonymous
3 years agoNot applicable
Distinct count from multiple tables
Hi all,
Here my data model :
I'd like to get the number of distinct apps (with Cost> 0), whatever the source
EXPECTED RESULT in a DAX mesure : 2 (to show this figure into a card chart.)
From now, I get 3 because APP01 is counted twice because it's matching into both sources
I thank you in advance for tips and advice.
1 Reply
- sjoerdvn
Solution Sage
if the mapping table is filtering source1 and source2, try something like this
App count = COUNTROWS(FILTER(VALUES('MAPPING TABLE'[APPS NAME]) ,CALCULATE(COUNTROWS(SOURCE1), SOURCE1[Cost]>0) + CALCULATE(COUNTROWS(SOURCE2),SOURCE2[Cost]>0) >0))