Forum Discussion

rlogin's avatar
rlogin
New Member
6 years ago
Solved

Best way to structure data, tabular or matrix?

I hope this isn't a dumb question, but as a new Power BI user I've been struggling with the best way to structure my data? Namely is it better to store things in a more tabular or matrix format. For example if I want to do analysis on a series of stocks, lets say Microsoft and Apple. Is it better to structure data such that:

 

Tabular:

Date, Return, Stock

1/1,  10%, Microsoft

1/2,  -5%, Microsoft

1/1,  3%, Apple

1/2,  -7%, Apple

 

or 

 

Matrix:

Date, Microsoft Return, Apple Return

1/1, 10%, 3%

1/2. -5%, -7%

 

I know this is quite generic and probably matters a lot on the use case/scalability issues, but I wasn't sure if one of these was generally better. I imagine a compromise would be to store the origin data in a tabular sql table and when importing it into power bi to create several queries filtering the original data set and then linking together.

 

Hopefully I'm not completly ignorant on this and the question makes sense! Thanks.

  • Hi rlogin ,

    Tables are the way to go. 

    A couple of books will be helpful if you are starting out. M is for (Data) Monkey and Supercharge Power BI, can't recommend them enough!
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

  • Hi rlogin ,

     

    In most case , tabular should be more useful when store data, such as you have many stocks and many time node one day, but each time node contain one stocks data, the matrix will be very large, and if you want to add one stock, matrix need to add one more column, but tabular does not to modify the data struction.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Icon for Community Champion rankCommunity Champion

    Hi rlogin ,

    Tables are the way to go. 

    A couple of books will be helpful if you are starting out. M is for (Data) Monkey and Supercharge Power BI, can't recommend them enough!
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi rlogin ,

     

    In most case , tabular should be more useful when store data, such as you have many stocks and many time node one day, but each time node contain one stocks data, the matrix will be very large, and if you want to add one stock, matrix need to add one more column, but tabular does not to modify the data struction.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.