The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Any help is well appreciated!!
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.