Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Star Schema Model Suggestions

Hi there. 

 

I'm fairly new to modelling in PowerBI but have a large amount of experience in your typical normalised ER data modelling for RDBMS. 

 

I have a table of data which shows outputs between an importing country and exporting country for a given year. The importing country side of the equation has values like population and GDP while the exporting side has just marketshare. 

 

FlatTable.PNG

 

Normally when I'm building an RDBMs I'd probably normalise this date into the following table structure.

Normalised.PNG

 

However, from what I read, this is probably not the most ideal structure for PowerBI and that I should attempt a more denomarlised 'star schema' approach with facts and dimensions.

 

However, even after doing quite a bit of reading on this, I'm not sure if I'm designing my star schema correct. My fact table ends up looking somewhat like this: 

FactTable.PNG

....which looks much like my original data table. Is this the correct structure for mdoelling in PowerBI? The database guy in me recoils at the duplication of the import country data. 

 

Or is there potentially another way. Perhaps two fact tables - one for export countries, one for import countries? OR are the attributes of populations, year and GDP actually attributes of a dimensions table?

 

Any help or suggestions much much appreciated!

 

Cheers

 

DM

1 ACCEPTED SOLUTION

I don't think you should worry about it too much.  As long as you know how to deal with repeated values, it'll be ok.  Just don't SUM them, there are plenty of aggregate functions in DAX to return what you want in any visualisation.

 

Also, unless file size and performance is critical, I wouldn't use surrogate keys for the country.  It makes it easier when inspecting the data in Data View.  You'll still want a country dimension (or two, import and export).

 

There are design theories in data warehousing that deal with this stuff, however powerbi can cope with lots of different designs.  So I say keep it simple - you can always redesign if required.

View solution in original post

5 REPLIES 5
PaulDBrown
Community Champion
Community Champion

@Anonymous 

What is the structure of the source tables?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






I don't think you should worry about it too much.  As long as you know how to deal with repeated values, it'll be ok.  Just don't SUM them, there are plenty of aggregate functions in DAX to return what you want in any visualisation.

 

Also, unless file size and performance is critical, I wouldn't use surrogate keys for the country.  It makes it easier when inspecting the data in Data View.  You'll still want a country dimension (or two, import and export).

 

There are design theories in data warehousing that deal with this stuff, however powerbi can cope with lots of different designs.  So I say keep it simple - you can always redesign if required.

Anonymous
Not applicable

Hi Hot Chilli. Thanks for the reply. Issue is that I do need to use some of those repeated data in calculations and visualisations - which seem to default aggregate them with 'sum'. I'm a newbie to DAX, any clues on creating a measure that doesn't aggregate the repeated values?

 

I think I've found a better way to model it. Create a key for each ImportCountryCode and Year combo and then link that candidate key to the export country data. 

"any clues on creating a measure that doesn't aggregate the repeated values" - 

 

a) https://docs.microsoft.com/en-us/power-bi/create-reports/service-aggregates 

b) write explicit measures

Anonymous
Not applicable

I posted a reply before Paul but it just randomly disappeared.

 

It's just a flat table like in the image, but I guess thats probably not the best way to show it.

 

I can't post the table here, but here's a link to the data in a google document.

 

Thanks very much.

 

DM

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors