cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
steve76 Regular Visitor
Regular Visitor

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 tried Amend function but not working in direct query mode. 

And merge doesn't seems my solution since in reality, my tables headers are different.

 

Do you have any other suggestion? 

Thank you!

 

Example :

 

 

merge tables.JPGexample

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-jiascu-msft
Microsoft

Re: Merge or append 2 queries (in direct query mode)

Hi @steve76,

 

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,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Microsoft v-jiascu-msft
Microsoft

Re: Merge or append 2 queries (in direct query mode)

Hi @steve76,

 

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,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

steve76 Regular Visitor
Regular Visitor

Re: Merge or append 2 queries (in direct query mode)

hello @v-jiascu-msft,

 

Thanks for your advice, I will use it accordingly (in DAX).

 

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (2,929)