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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
akhaliq7
Post Prodigy
Post Prodigy

How to implement a star schema

I have two fact tables, they can't join due to a m:m relationship. I have read that a star schema design should be followed to fix this. What is the best way to add the dimension tables to my model. 1 way could be to get it directly from the oracle database my work uses but that contains a lot of steps. Is there another way I can create dimensional tables in power query using the rows and columns already present in the model.

1 ACCEPTED SOLUTION

Thanks for your time, I have managed to solve this issue I had.

View solution in original post

8 REPLIES 8
Greg_Deckler
Super User
Super User

@akhaliq7 Star schemas are great but I have rarely in the real world ever seen a true star schema used in business models. They are always more complex than that. I would recommend a bridge table between your two fact tables with bi-directional relationships. Then you can add your dimensions to either fact table.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I have tried that in my case the two fact tables won't filter properly i have order_id as the key column in the bridge table but then sales person is in both fact tables but will not filter correctly in both,

unless i use sales person id as the key column in the bridge table but then order id will not be related in both tables.

@akhaliq7 Going to need to see example data. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

sorry can't post sample data or table data fields as it is for my workplace can get in trouble for sharing internal workings, its ok if you can't help I am going to look at some other resources for getting the job done. 

@akhaliq7 Fake data is fine.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for your time, I have managed to solve this issue I had.

Hi @akhaliq7 

I am so glad that you can solve your problem.Please kindly Share your workaround or Accept the helpful reply as the solution. More people will benefit from it. 


Best Regards,

Rico Zhou

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.