Forum Discussion
Data model with multiple sales tables
Hi,
I'm trying to build a sales data dashoboard with data that comes from our data warehouse. The issue i have is that we have multiple shopify stores. Therefore i have multiple sales tables, customer tables etc. Does anyone know the best way to model this in order to give total sales etc.
Any help would be much appreciated.
6 Replies
- amitchandak
Super User
Jameswh91 , If want to combine analysis better append the sales table. The customer you need to master data management, In case you can not just append and use
- Jameswh91
Helper III
Hi amitchandak thanks for your reply. It is much appreciated. Once the quesries have been appended, how would i then be able to differentiate the separate stores?
- PaulDBrown
Community Champion
Add a column to each store query with the store ID or name before appending them.
- AnonymousNot applicable
Hi, i would suggest that you create a birdge table containing names of unique stores. Then add the store name column in each sales table with one to many relation. This will give you sales for all stores.
- v-chenwuz-msft
Community Support
Hi Jameswh91 ,
The best model in power bi are Star and Snowflake model. Sales table should be the Fact table, other tables in the model should be Dimensional tables.
In your case:
sales table should be many side of the relationship related with other tables.
products order and sales table create many to many relationship.
You can refer this model provided by official.
Get samples 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.