locked
Combining Multiple HTML Tables into Query RRS feed

  • Question

  • Greetings,

    I am trying to determine how to combine multiple tables into a query from an HTML source. I want to include some subset of the tables below, but I can't figure out how to do it without creating individual queries for each one and then merging. Any guidance would be appreciated.

    Wednesday, August 7, 2013 8:54 PM

Answers

  • You can accomplish this by using the Table.Combine( ) function as a new step within your query. While this is not currently available within a query through the UI, it is a simple function you can enter through the formula bar.

    Each table is can be accessed by indexing your Source step, for example Table 0 is Source{0}[Data]. To combine Table 0 and Table 1, you create a new step and provide both tables as a list to the Table.Combine function (below). You can create this new step by selecting the "fx" icon next to the formula bar.

    = Table.Combine({Source{0}[Data], Source{1}[Data]})

    To combine more tables, simply add them (comma delimited) to the list. Please let us know if you have any other questions!

    Thanks,

    Theresa

    Friday, August 9, 2013 3:46 PM

All replies

  • You can accomplish this by using the Table.Combine( ) function as a new step within your query. While this is not currently available within a query through the UI, it is a simple function you can enter through the formula bar.

    Each table is can be accessed by indexing your Source step, for example Table 0 is Source{0}[Data]. To combine Table 0 and Table 1, you create a new step and provide both tables as a list to the Table.Combine function (below). You can create this new step by selecting the "fx" icon next to the formula bar.

    = Table.Combine({Source{0}[Data], Source{1}[Data]})

    To combine more tables, simply add them (comma delimited) to the list. Please let us know if you have any other questions!

    Thanks,

    Theresa

    Friday, August 9, 2013 3:46 PM
  • Thank you! I had used the "&" operator to string together the tables in the query, but your solution is much better.


    • Edited by aaaa33243 Monday, August 12, 2013 12:22 AM
    Monday, August 12, 2013 12:21 AM