Forum Discussion
Column Calculation not get right
- 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
You may try create measure like below.If it is not your case,please share the .pbix file for us to test.You can upload the .pbix file to OneDrive and post the link here or send me via private message. Do mask sensitive data before uploading.
Repurchased Count =
CALCULATE (
DISTINCTCOUNT ( 'Energy Drink'[Customer Code ] ),
FILTER (
ALLSELECTED ( 'Energy Drink'[Customer Code ] ),
[RE-Purchased1] = "Repurchased"
)
)
Regards,
Cherie
v-cherch-msft , https://www.dropbox.com/s/79j0c729sa3khda/20191203-Category%20Report%20V3.pbix?dl=0
hi , you can go and check the link above ,
*My purpose is also to see how many Repurchased and No Repurchased. it is all filtered based on the data filtering.
- v-cherch-msft7 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
- Chanleakna1237 years agoPost Prodigy
Hi v-cherch-msft you're brilliant , thanks for your quick help.
- Chanleakna1237 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