Secret of "Calculate" in DAX

Calculated Columns တွေမှာ Aggregation formula ရေးကြတဲ့ အချိန်မှာ Filter Context မရှိတဲ့ အတွက် ပုံမှာပြထားတဲ့ AllProductSales formula ရဲ့ အဖြေဟာ table တစ်ခုလုံးရဲ့ ပေါင်းလဒ် ဖြစ်နေပါတယ်။ ဒီလို ဖြစ်နေတဲ့ row context ကို filter context ဖြစ်လာအောင် ပြောင်းချင်တယ် ဆိုရင် "CALCULATE" command ကို သုံးပြီး ပြောင်းနိုင်ပါတယ်။ ဒီလို ပြောင်းနိုင်တာက Context Transition ရဲ့ Power တစ်ခုလဲ ဖြစ်ပါတယ်။

ပုံမှာ ပြထားတဲ့ ProductSales formula က AllProductSales မှာ သုံးထားတဲ့ SUMX ကို CALCULATE နဲ့ အုပ်လိုက်တာ ဖြစ်တဲ့အတွက် ပုံမှန် Row Context ကနေ Filter Context ဖြစ်သွားပြီး Table တစခုလုံးရဲ့ ပေါင်းလဒ်အစား product line တစ်ခုချင်းရဲ့ Sales ပေါင်းလဒ်ကို ပြပေးနိုင်တာ ဖြစ်ပါတယ်။


In measure, calculate is working implicitly, whether it is explicitly defined or not. But in calculated columns, it is to define when context transition is required.

enter image description here