Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Merge or append 2 queries (in direct query mode)

Hello,   I would like to combine some data from 2 differents tables in direct query mode. The objective is to get sales from table 2 to table 1, for only 1 specific shop (see example below).   I...
  • v-jiascu-msft's avatar
    7 years ago

    Hi Anonymous,

     

    Do you have the latest version of Power BI Desktop? You can append the queries in the Query Editor after changing the column names. 

    Another solution is using DAX. Maybe this one like below.

    Table =
    UNION (
        SELECTCOLUMNS (
            st2,
            "Date", [Date],
            "Day", [Dayz],
            "Month", [Month],
            "Value", [Value],
            "Year", [Year]
        ),
        SELECTCOLUMNS (
            table2,
            "Date", [date2],
            "Day", [Dayz],
            "Month", [Month],
            "Value", [Value],
            "Year", [year2]
        )
    )
      

     

     

    Best Regards,