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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Bobbys
Helper III
Helper III

Data modelling with many-to-many relationships

Hello everyone. 

 

I'm having a difficult time trying to set up my data model in the best way based on the underlying data I have. 

I'm trying to create a report based on four tables. They all contain the product's barcode number and a period, but one table may contain the product price while another may contain the COGS. I use the table "Grunnpriser" as my dimension table. 

Naturally, this causes my model to consist of several many-to-many relationships between the tables. 

 

I must be able to filter based on period. I have initially tried adding an additional column in all the different queries which combines the period with the product's barcode, which ends up looking something like this: 2019-JULY-##########. I though that this would make it easier for the model to filter, since one product is sold in multiple periods and one period contains of multiple products. This was unsuccessful.

 

Now, I'm starting from scratch, and would really appreciate some tips on how you guys would set up your data model to work. Due to sensitive data I am unfortunately not able to share the dataset or model. 

 

Bobbys_0-1662989901473.png

 

Any help is well appreciated!!

 

 

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Bobbys ,

 

You can create a calendar table and create one-many relationship between them, and a new table contains all the products id or name.

It is best to use a star schema for the model in power bi.

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I have read about star schema, however I haven't really been able to find any good examples to how to set it up in an actual PowerBI file. I've read about of theory regarding it but none of them has really explained how to start with the process of setting it up. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors