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
v-cherch-msft , hi the calculation works perfect , but can i have it in Column ? It will be easy to filter or slicer. of Repurchased or no Repurchased.
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
- Chanleakna1237 years ago
Post Prodigy
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 ago
Microsoft 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 ago
Post 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 ?