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 below dax:
Column =
IF (
CALCULATE (
SUM ( 'Energy Drink'[count] ),
ALLEXCEPT ( 'Energy Drink', 'Energy Drink'[Customer Code ] )
)
>= RELATED ( 'Master Outlet'[Count Outlet] ),
"Repurchased",
"No Repurchased"
)
Regards,
Cherie
Hi , when i use Date Filter , it dones't work , Measure Repurchased/No Repurchased , and Colum are different.
When i Filter "Date " , Measure- Repurchased/NoRepurchased filtered as expected , But Column - Column Calculation i used as per your mentioned was not run as date filter. you see it turns wrong .
how to solve such thing ? I want it to be filtered any slicer i used For example : Date
- v-cherch-msft7 years agoMicrosoft Employee
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
- Chanleakna1237 years agoPost Prodigy
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