Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How can I do data segmentation efficiently with differents tables?

Hello,

 

I have many different tables, each one represents the sales of a specific product and the attributes, such as sale date, price, client name, etc. of that specific product.

 

I want to build a dashboard that I could filter all the informations by product. For instance: I want to see the revenue from product X e the amount sold, then I want do click in a button to see the same informations but for the product Y.

 

How can I do this data segmentation without join all the differents tables in just one table?

  • You need to combine (append) all of these sales table into one. This is called your FACT Table. Your DIM tables, or Dimension Tables, would be your product table, date table, customer table, etc.

    You do not want 10 different Sales tables, one for each product. The DAX would be a nightmare to write and maintain, and you are severly limiting what the visuals will do.

     

    You will want to do the COMBINE operations in Power Query - it simply stacks the tables on top of each other. You then right-click the 10 separate tables (I made 10 up, but whatever your number is) and uncheck the "Enable Load" but you want to "Enable Load" only on the final table that is the combination of all 10 tables.

    This is called a Star Schema, and it is essential to a successful Power BI project. If you do anything that is not a Star Schema, the larger your data gets, and the more complex the data becomes, the harder it will be to write a report to do what you want, it will run slower, and eventually you will paint yourself into a corner and it simply will not be possible.

     

    To see how to combine tables, see this article Append queries | Microsoft Docs

3 Replies

  • edhans's avatar
    edhans
    Community Champion

    You need to combine (append) all of these sales table into one. This is called your FACT Table. Your DIM tables, or Dimension Tables, would be your product table, date table, customer table, etc.

    You do not want 10 different Sales tables, one for each product. The DAX would be a nightmare to write and maintain, and you are severly limiting what the visuals will do.

     

    You will want to do the COMBINE operations in Power Query - it simply stacks the tables on top of each other. You then right-click the 10 separate tables (I made 10 up, but whatever your number is) and uncheck the "Enable Load" but you want to "Enable Load" only on the final table that is the combination of all 10 tables.

    This is called a Star Schema, and it is essential to a successful Power BI project. If you do anything that is not a Star Schema, the larger your data gets, and the more complex the data becomes, the harder it will be to write a report to do what you want, it will run slower, and eventually you will paint yourself into a corner and it simply will not be possible.

     

    To see how to combine tables, see this article Append queries | Microsoft Docs

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks man, these information helped me a lot as a begginer user that don't know the keys concepts.

      • edhans's avatar
        edhans
        Community Champion

        Glad to help out Anonymous. These are pretty basic concepts, but as a beginner, they totally overwhelmed me at first too. Hope this helps out a bit in getting you started on the right foot! Please post back to the forums with any questions you have on your Power BI Journey!