Forum Discussion

Jameswh91's avatar
Jameswh91
Helper III
4 years ago
Solved

Building a 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.

  • Hi Jameswh91 ,

     

    You're aiming to build a STAR SCHEMA model, where each of your sales tables are FACT tables, and you relate these to DIMENSION tables that hold descriptive fields that are common to all the sales tables.

     

    https://docs.microsoft.com/en-us/power-bi/guidance/star-schema 

     

    This is standard best practice in almost any (relational) data modelling scenario.

     

    Here's a simplified view of a model I'm currently working on that uses a star schema model over multiple fact tables. You'll see that every dimension table is related to every fact table on common fields:

     

    The actual model has 6 fact tables and 9 dimension tables, but all the fact tables are controllable for calculation purposes by the dimension tables.

     

    Pete

2 Replies

  • Hi Jameswh91 ,

     

    You're aiming to build a STAR SCHEMA model, where each of your sales tables are FACT tables, and you relate these to DIMENSION tables that hold descriptive fields that are common to all the sales tables.

     

    https://docs.microsoft.com/en-us/power-bi/guidance/star-schema 

     

    This is standard best practice in almost any (relational) data modelling scenario.

     

    Here's a simplified view of a model I'm currently working on that uses a star schema model over multiple fact tables. You'll see that every dimension table is related to every fact table on common fields:

     

    The actual model has 6 fact tables and 9 dimension tables, but all the fact tables are controllable for calculation purposes by the dimension tables.

     

    Pete

  • Aryna's avatar
    Aryna
    Post Partisan

    Hi Revokez , you can also look into existing third-party connectors. This ready-to-use solution offers a free Shopify Power BI template that already includes the key Shopify tables and built-in data relationships, so you can plug in your data and get started right away: https://vidi-corp.com/shopify-analytics-dashboards/. This template also allows to export data from multiple Shopify stores.

     

    It’s a great shortcut if you’re not familiar with Shopify data modeling or want to speed up the process. Alternatively, you can also look into existing third-party connectors.