Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Making a matrix with data from multiple data tables

Hi!   I'm new to Power BI, and have been struggeling a lot with this. I am working on creating a table/matrix which can represent data generated automatically for different devices located in diffe...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Anonymous - You only have a few options here, but you really only have a few data transformation steps before being able to render the view you need in a matrix table in BI. Remember, if the data you're working with is consistent, then creating a series of applied transformation steps in PowerQuery can be easily replicated with new data, even if it's a separate table. 

     

    If it turns out to be many tables, then I would probably reconsider the initial data sourcing and ETL process, i.e., write a SQL script or maintain a cloud based data source to more easily bring in data as it's updated or refreshed for reporting purposes. 

     

    1. Unpivot only the two data columns in each table to render the previous columns headers as row values. 

    Table 1:

    Table 2:

     

    2. Append the two data tables into one single table. This is the equivalent of a UNION ALL function in SQL, it just simply stacks the data tables on top of one another - ensuring, of course, that data types and field headers are consistent in both tables. 

     

    3. Drop in the necessary fields into Rows and Columns to render the view you need. 

     

    Remember, unpivoting or flattening data in PowerQuery - granted you don't really have any DAX functions to write, of course - will help you render much more dynamic table matrices in Power BI. 

     

    If this is what you were trying to accomplish, please mark this as a solution for others to review.