Power BI Data Modeling – Fixing Table Issues & Building Star Schema (Tamil)
Power BI Data Modeling – Table-wise Issues Identify பண்ணி Fix பண்ணுற Real-Time Approach
இந்த stage-ல நம்ம Power BI-யோட real foundation work start ஆகுது. Dashboard, charts, visuals எல்லாம் இன்னும் start கூட பண்ணல. இப்ப நம்ம focus முழுக்க 👉 ஒவ்வொரு table-ல இருக்கிற data issues identify பண்ணி, root level-ல fix பண்ணுறது.
Strong model இல்லாமல் dashboard build பண்ணினா, later stage-ல numbers mismatch, relationship confusion, wrong business insights எல்லாம் வருவது guaranteed. அதனால தான் இந்த session முழுக்க model correctness & validation மட்டுமே.
🔍 Customer Table Issue – One Customer, Multiple Countries?
First, customer table-ஐ check பண்ணும்போது ஒரு serious issue தெரிஞ்சது 😮
ஒரே Customer ID-க்கு multiple countries map ஆகி இருந்தது.
Power BI-ல simple-ஆ:
Customer ID + Count of Country வைத்து chart போட்டா
👉 same customer → 2 countries
Business logic-ஆ இது possible இல்லை.
ஒரு customer usually ஒரு country-க்கு தான் belong ஆகணும்.
அதனால next step 👇
👉 SQL side-ல check பண்ணோம்
👉 Orders clean table-ல இருந்து, customer-wise country count analyse பண்ணோம்
Root cause என்னனா, same customer multiple countries-ல orders place பண்ணிய மாதிரி raw data-ல record இருந்தது.
🧠 Smart Fix – Guess இல்ல, Logic Base Decision
Random-aa country remove பண்ணல ❌
Instead, logical approach use பண்ணோம் ✅
👉 அந்த customer எந்த country-ல அதிக transactions / orders place பண்ணிருக்காரோ
👉 அந்த country-யை primary country-ஆ choose பண்ணோம்
SQL view alter பண்ணி logic apply பண்ணியதும்,
Power BI refresh பண்ணும்போது 👇
🎯 One customer → One country
🎯 One-to-many relationship correct-aa work ஆக ஆரம்பிச்சது
Customer table issue solved ✅
📦 Orders / Order Items – Duplicate Records Issue
Next, order items table-ல duplicate records detect ஆனது.
Same Order ID + Same Product ID
ஆனா record count multiple times 🤔
Power BI-ல count check பண்ணும்போதே confirm ஆயிடுச்சு – duplicates exist.
SQL raw data-ல cross-check பண்ணினோம்:
👉 Same invoice number
👉 Same stock code
👉 Multiple identical rows
Possible reasons:
• Order reprocessing
• Manual correction
• System bug
🛠️ Duplicate Fix – Row Number Technique
Duplicate fix பண்ண simple delete approach use பண்ணல ❌
Instead, professional SQL approach 👇
👉 All columns base பண்ணி Row Number generate
👉 First row மட்டும் retain
👉 Remaining duplicate rows filter out
இதோட bonus advantage என்னனா 👇
✨ Order Item Key create ஆனது
✨ Unique key கிடைச்சது
🔑 Order Item Key – Relationship Game Changer
Order Item Key create ஆனாலும்,
Fact table-ல அந்த key இல்லாததால relationship create பண்ண முடியல.
So next step 👇
👉 Fact table view alter பண்ணி
👉 Orders + Order Items join பண்ணி
👉 Order Item Key-யை fact table-க்கு கொண்டு வந்தோம்
Refresh பண்ணி check பண்ணினா 👀
Relationship clean-aa create ஆயிடுச்சு.
One-to-One default-aa வந்தாலும்,
👉 Direction single
👉 Relationship many-to-one-aa change பண்ணினோம்
Always remember ⚠️
One-to-One relationship avoid பண்ணணும்.
If One-to-One வந்தா:
• Either merge tables
• Or redesign relationship
🧾 Product Table – Many-to-Many ஏன் வருது?
Next challenge 😅
Product dimension table-ல Many-to-Many relationship.
Reason analyse பண்ணும்போது 👇
Same Product ID-க்கு multiple descriptions
Mostly invalid / testing / wrong updates
Correct product identify பண்ண:
👉 Usage-based logic use பண்ணோம்
👉 Maximum usage count base பண்ணி correct product name select பண்ணோம்
SQL view alter பண்ணி
👉 Row number + partition logic apply பண்ணி
👉 One valid product per Product ID retain பண்ணோம்
Refresh பண்ணதும் 🎉
Duplicates gone
One-to-many relationship perfect-aa work பண்ணிச்சு.
⭐ Star Schema – Finally Achieved
இந்த fixes எல்லாம் முடிஞ்ச பிறகு 👇
✔ Fact table center-ல
✔ Dimensions (Customer, Product, Date) around it
✔ Clean relationships
✔ No many-to-many
✔ No ambiguity
👉 Proper Star Schema ready 🚀
✅ Model Validation – Most Important Step
Model create பண்ணிட்டோம் அப்படின்னு stop பண்ணல.
Validation mandatory 🔍
SQL vs Power BI compare பண்ணினோம்:
😎 Total rows count
😎 Distinct order count
😎 Total sales amount
All values exact-aa match ஆயிடுச்சு.
Decimal rounding difference minor – business impact இல்ல.
This step skip பண்ணினா later stage-ல trust issues வரும்.
⛔ What We DID NOT Do in This Session
❌ Measures create பண்ணல
❌ DAX write பண்ணல
❌ Charts build பண்ணல
❌ Dashboard start பண்ணல
Reason 👉
Model strong-aa இல்லாமல் measures build பண்ணுவது waste.
.png)
கருத்துரையிடுக
0 கருத்துகள்