Forum Discussion
sglee
6 years agoFrequent Visitor
Count based on criteria from 2 different table
I want to analyze trend of change from year to year Customer 2018 2019 AA01 Satisfied Dissatisfied BB01 Dissatisfied Satisfied CC01 Satisfied Satisfied Both 2018 and 2019 ...
az38
Community Champion
6 years agoHi sglee
First, obviously you need relationships between 2018, 2019 and customer tables.
I guess, the Customer field should be the key for these relationships
If Im right you could create a columns in the CustomerTable like
ColumnSatToDis = CALCULATE(Countrows('CustomerTable'),
FILTER(ALL('CustomerTable'),
RELATED('Table2018'[Satisfaction])="Satisfied" && RELATED('Table2019'[Satisfaction])="Dissatisfied"
)
)and
ColumnDisToSat = CALCULATE(Countrows('CustomerTable'),
FILTER(ALL('CustomerTable'),
RELATED('Table2019'[Satisfaction])="Satisfied" && RELATED('Table2018'[Satisfaction])="Dissatisfied"
)
)
do not hesitate to give a kudo to useful posts and mark solutions as solution