In a PowerBI project, I need some help to define the fact table/s. Eventually, I would like to have a nice star scheme to preset some basic visuals as stacked bar etc. to the client.
I'm new to BI and I'm afraid that I'm missing here something very obvious.
Description of the data
I have data stored in a tables: City, Company, Budget, CategorizedBudget and Expense.
The City table contain city name and region.
The Company table contain company name and city.
The Budget table contain companies annual budget amounts.
The CategorizedBudget table contain some of the annual budget amounts of those companies, divided by categories
|1||1||Category A||400000 $|
|2||1||Category B||300000 $|
|3||1||Category C||300000 $|
The Expense table contain tertile budget amounts of those companies, divided by categories.
|1||1||2019||1||Category A||100000 $|
|2||1||2019||1||Category B||100000 $|
|3||1||2019||1||Category C||150000 $|
|4||1||2019||2||Category A||150000 $|
|5||1||2019||2||Category B||50000 $|
|6||1||2019||2||Category C||150000 $|
|7||1||2019||3||Category A||100000 $|
|8||1||2019||3||Category B||150000 $|
|9||1||2019||3||Category C||50000 $|
The visuals should be:
Stacked Column Chart that show sum of the annual budget amounts for the companies city regions
Stacked Column Chart that show sum of the annual expenses amounts for the companies city regions
when drilling to the expenses, show the amounts by tertiles.
It appears that the dimensions are: Date (year, tertile), Location (city, region), Category (name), Comapny (name)
The fact is where I'm getting confused. I thought about some practices:
Merging Budget and CategorizedBudget and Expenses into one fact.
|1||1||2019||1||Category A||100000 $||?|
|2||1||2019||1||Category B||100000 $||?|
|3||1||2019||1||Category C||150000 $||?|
|4||1||2019||2||Category A||100000 $||?|
|5||1||2019||2||Category B||100000 $||?|
|6||1||2019||2||Category C||150000 $||?|
But the budget annual amounts are not divided to tertiles.
Merging the Budget and CategorizedBudget to one fact and getting the Expenses as one fact.
|1||1||2019||Category A||100000 $|
|2||1||2019||Category B||100000 $|
|3||1||2019||Category C||150000 $|
But some of the budget annual amounts are not categorized.
Use three facts for Budget and CategorizedBudget and Expenses
But it looks not starry at all.. and I'm afraid It will be complicated if I'll have to add more fact and dimensions later. It also feel like I'm duplicating something here.
Any help would be appreciated