Forum Discussion

DC2024's avatar
DC2024
Frequent Visitor
2 years ago
Solved

Struggling with creating correct data model - help please!

Hi all,   Sorry - I'm sure this is incredibly simple but I am struggling with the best way to set up my data model so that I can get proper insights. Hope the below makes sense, let me know if anyt...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi DC2024 ,

     

    You can create a separate dimension table for stores, products and date.

     

    For example:

     

    Fact Table:

     

    Product dimension table:

     

    Store dimension table:

     

    Date dimension table:

    DateTable = ADDCOLUMNS(
            CALENDAR(MIN('Fact Table'[Date]),MAX('Fact Table'[Date])),
            "Year",YEAR([Date]),
            "Quarter",ROUNDUP(MONTH([Date])/3,0),
            "Month",MONTH([Date]),
            "Day",DAY([Date])
    )

     

    Create relationships between them. This is key to a functional STAR schema. 

     

    pbix file is attached.

     

    If you have any further questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!