Forum Discussion

emiel's avatar
emiel
Regular Visitor
4 years ago
Solved

Combine multiple table with raw measures in 1 graph

Hi All,

 

I'm measuring energy consumption and write the results in an SQL database. The measures have 2 columns: a date/time stamp and the value. I'd like to combine the various tables into 1 graph to do some analytics.

 

The preferred route to do this is to combine the various tables into 1 table in PowerBI. 1 column has a (different) date/time stamps and than 1 column per source table. The date/time stamps however are different and random between the data sources. How to comine the tables into 1 table? 

 

many thanks, 

  • 1. Load two tables in Power Query (Table 1 & Table 2 for example)

    2. Make sure that Value columns have different names, just rename it like Value 1, Value 2

    3. Select second table, Transform tab go to Append as new

    4. Close & Apply and use the new table in Table/Matrix visual as select time, Value 1, Value 2 columns

     

    Appreciate your Kudos !!!

    https://allure-analytics.com/

6 Replies

  • ALLUREAN's avatar
    ALLUREAN
    Icon for Solution Sage rankSolution Sage

    1. Load two tables in Power Query (Table 1 & Table 2 for example)

    2. Make sure that Value columns have different names, just rename it like Value 1, Value 2

    3. Select second table, Transform tab go to Append as new

    4. Close & Apply and use the new table in Table/Matrix visual as select time, Value 1, Value 2 columns

     

    Appreciate your Kudos !!!

    https://allure-analytics.com/

    • emiel's avatar
      emiel
      Regular Visitor

      this works better, it doesn't combine measure on the same date/timestamps, however. But lets see if that works either way.

      thanks!

      • ALLUREAN's avatar
        ALLUREAN
        Icon for Solution Sage rankSolution Sage

        Both tables should have same column name for time if this is the case

        Table 1 (Time - Value 1) & Table 2 (Time - Value 2)

    • emiel's avatar
      emiel
      Regular Visitor

      Hi amitchandak thanks for you guidance, but it doesn't seem to work, I probably am doing something wrong.

      I'm getting the result as shown below, both different values are merged, even the one with the same date/timestamp is merged corretly. But the date/timestamps are not added and shown empty.

       

      any ideas?

      thx!

       

  • emiel's avatar
    emiel
    Regular Visitor

    Some samples, first the two different SQL tables:

     

    I'd like to add them into 1 new table like this: