Forum Discussion

EugenioProlog's avatar
EugenioProlog
Icon for Helper III rankHelper III
7 months ago
Solved

What is the data structure to create a matrix table?

I want to create a dashboard for inventory control. I need to manage the stock of macro items (kits) and sub-items (components of the kits). I want to create a matrix table where I have the items (ki...
  • FBergamaschi's avatar
    7 months ago

    Hi EugenioProlog,

    you should have:

    one fact table with product id, day (or YearMonth), qty and value 

    one calendar table at the day or month granularity, depending on your needs (Primary Key Date or YearMonth)

    one product table (PK ProductId, leadtime, other attributes, SubitemId)

    one subitem table (PK SubitemId, attributes, KitId))

    one kit table (PK KitId and attributes)

     

    connect all dimentions to the fact table one to many

     

    then you need a DAX measure to implement your logic (measures)

     

    For example, the data you are showing refer to February, is that the value at the end of the month?

     

    Best

     

    If this helped, please consider giving kudos and mark as a solution

    @me in replies or I'll lose your thread

    Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

    Consider voting this Power BI idea

    Francesco Bergamaschi

    MBA, M.Eng, M.Econ, Professor of BI