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
Only measure can be dynamic.If you create a column,it cannot be dynamic or changed by slicer.I would suggest you use measure instead of calculated column.
Regards,
Cherie
hi v-cherch-msft ,if i acheived this by using Measure , i wanna count , How Many Re-purchased and No Repurchased . How to use the calculation ?
- v-cherch-msft7 years agoMicrosoft Employee
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
- Chanleakna1237 years agoPost Prodigy
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