Forum Discussion

donodackal's avatar
donodackal
Helper I
4 years ago
Solved

How to create a single table using data from different data sources?

Hi there   Would appreciate any help. I have 10 different data sources that are in different formats (not consistent with each other) and the only common data in each data source is one column - th...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, donodackal 

    You can try to create a calculated table to combine these table columns.

    Table =
    VAR tab1 =
        SELECTCOLUMNS (
            Table1,
            "ProductName", Table1[product name],
            "Cost", Table1[$ cost],
            "Expense", Table1[expense],
            "datasource", "table1"
        )
    VAR tab2 =
        SELECTCOLUMNS (
            Table2,
            "ProductName", Table2[product name],
            "Cost", Table2[$ cost],
            "Expense", Table2[expense],
            "datasource", "table2"
        )
    VAR tab3 =
        SELECTCOLUMNS (
            Table3,
            "ProductName", Table3[product name],
            "Cost", Table3[$ cost],
            "Expense", Table3[expense],
            "datasource", "table2"
        )
    RETURN
        UNION ( tab1, tab2, tab3 )
    

    Please check my sample file for more information.

    If it doesn't work, please share more details.

     

    Best Regards,
    Community Support Team _ Eason