Static Segmentation

Static Segmentation

Static Segmentation ဆိုတာ customer age, unit price, yearly income လို ပြန့်ကျဲနေတဲ့ data value တွေကို Age Group, Price Range, Income Range လိုမျိုး ကန့်သတ်ချက်တွေနဲ့ စုဖွဲ့ပြီး analysis လုပ်ဖို့အတွက် Power BI ရဲ့ data model မှာ ကြိုတင်သတ်မှတ်ထားတဲ့ predefined range တွေနဲ့ data ကို အစုဖွဲ့ခဲ့တဲ့ method ဖြစ်ပါတယ်။

ဥပမာ။ Customers တွေရဲ့ age ပေါ်မူတည်ပြီး မိမိ စိတ်ဝင်စားတဲ့ အသက်အကန့်အသတ်ပေါ်မူတည်ပြီး analysis လုပ်ဖို့ လိုအပ်တဲ့ အချိန်မျိုးမှာ ပထမဆုံး age group range တွေကို သတ်မှတ်ဖို့ ဒီလို table (Age Group Ref) တစ်ခု တည်ဆောက် ထားရပါမယ်။
enter image description here

ဒီ table နဲ့ customer table ကို relation ချိတ်မယ်ဆိုရင် customer table မှာက exact age ပဲ ရှိပြီး age group table မှာကတော့ range ဖြစ်နေတဲ့ အတွက် တိုက်ရိုက်ချိတ်ဆက်လို့ မရပါဘူး။ ဒီလို case မျိုးအတွက် အကောင်းဆုံး လုပ်သင့်တာကတော့ age group range table ထဲက age group တွေကို customer table ထဲကို de-normalized လုပ်ပြီး calculated column အနေနဲ့ ထည့်တာပါပဲ။

enter image description here

ဒီ formula မှာ Age group table ထဲက Minimum Age နဲ့ Maximum Age အကြား range နဲ့ Customer ရဲ့ Age ကို comparison/ logical function ရေးပြီး အဲဒီ range အတွင်းရောက်နေတဲ့ Age Group Range ကို Values function သုံးပြီး ဆွဲထုတ်ပါတယ်။

ပုံမှန်အားဖြင့် Values function က tables ကို ထုတ်ပေးတဲ့ function ဖြစ်ပေမဲ့ အခု calculated column လို scalar value ပဲ လိုအပ်ရမဲ့ နေရာမှာလဲ scalar တန်ဖိုးကို ထုတ်ပေးနိုင်ပါတယ်။ ဒီ formula ရေးလိုက်တယ်ဆိုရင် သတ်မှတ်ထားတဲ့ age group range အတွင်းမှာ ရှိတဲ့ customers တွေအတွက် age group အဖြေကို ပြန်ထုတ်ပေးပြီး သတ်မှတ်ချက် range အတွင်း မရှိတဲ့ customer ရဲ့ age တွေအတွက် ဆိုရင်တော့ blank ဖြစ်နေပါတယ်။ တကယ်လို့ blank နေရာမှာ အဖြေတစ်ခု ထည့်ပေးချင်ရင်တော့ formula ကို ဒီလို ပြင်လို့ ရပါတယ်။

enter image description here

ပထမမှာ age group range ကို variable တစ်ခုထဲမှာ ဖတ်ထည့်ထားပြီး အဲဒီ variable ကို IF statement မှာ IsBlank function နဲ့ ပြန်စစ်ရပါတယ်။ တကယ်လို့ blank ဖြစ်နေခဲ့ရင် “Age Not In Interest Group” လိုမျိုး message တစ်ခုပေးပြီး အဖြေထွက်ခဲ့ရင်တော့ အဲဒီ range ကို return ပြန်ပေးရပါမယ်။