Forum Discussion
Chanleakna123
7 years agoPost Prodigy
Column Calculation not get right
Hi All , I have such below Table , Column of Purchase/No PUrchase ; Count are calculated in Edit Query , as of result this is the table : Customer Code Customer Name Date Value Purc...
- 7 years ago
Please check below dax.
Count = CALCULATE ( COUNT ( 'Energy Drink'[Customer Name - Store host code] ), FILTER ( ALLSELECTED ( 'Energy Drink' [Customer Name - Store host code]), [Repurchased/No Repurchased]= SELECTEDVALUE('Re-Purchased/No Repurchased'[Type]) ) )Regards,
Cherie
v-cherch-msft
7 years agoMicrosoft Employee
Please check below dax.
Count =
CALCULATE (
COUNT ( 'Energy Drink'[Customer Name - Store host code] ),
FILTER (
ALLSELECTED ( 'Energy Drink' [Customer Name - Store host code]),
[Repurchased/No Repurchased]= SELECTEDVALUE('Re-Purchased/No Repurchased'[Type])
)
)
Regards,
Cherie
Chanleakna123
7 years agoPost Prodigy
Hi v-cherch-msft , I do the calculation for another Purchase/No Purchase , And i follow the calculation of Repurchased/No Repurchased as per your mentioned.
but it's strang , Purchase/No PUrchase Calculation : Count only 2 Customers Who Purchase , but for customer who get 0 it will go to No Purchased , but it doesn't count into No Purhcase , it keeps blank . therefore i can't see the number of customer who Purchase and No Purchase , Purchase is customer value >=1 , No Purchase <1 .
***Purchased/No Purchased = SWITCH(TRUE(),[Sum Value]>=1,"Purchased","No Repurchased")
***Count Purchased/No Purchased =
CALCULATE (
DISTINCTCOUNT ( 'Energy Drink'[Customer Name - Store host code] ),
FILTER (
ALLSELECTED ( 'Energy Drink' [Customer Name - Store host code]),
[Purchased/No Purchased]= SELECTEDVALUE('Purchased/No Purchased'[Type])
))
- Chanleakna1237 years agoPost ProdigyCan u please help to settle how to see the amount of Customer who purchase and no purchase on table ? While now no purchased customer show blank