Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merging data from 3 tables

Hi,

I would like to merge data from 3 tables, into 1 table. I tried doing the relationship between dates, but I get missing data, and some data is duplicated. Not all dates are the same in tables.

 

Should there be some new table in between with the data that can link all 3 together?

 

Example of tables:

 

TABLE1

ID

  Date

  StoreID

  ComputerID

  TData1

  TData2

100001

  2019-06-01

  S001

  C001

  13

  11

100002

  2019-06-01

  S001

  C002

  2

  5

 

TABLE2

ID

  Date

  StoreID

  DData1

  DData2

  DData3

200001

  2020-01-04

  S001

  3

  1

  7

200002

  2020-01-05

  S001

  14

  2

  9

 

TABLE3

ID

  Date

  StoreID

  ComputerID

  BData1

  BData2

300001

  2019-06-01

  S001

  C003

  11

  11

300001

  2019-06-02

  S001

  C003

  15

  2

  • Hello Anonymous 

     

    use the function Table.Combine like this

    Table.Combine({TABLE1, TABLE2, TABLE3})

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy

1 Reply

  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello Anonymous 

     

    use the function Table.Combine like this

    Table.Combine({TABLE1, TABLE2, TABLE3})

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy