Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Appending specific rows from one table to another using DQ

Hi there,

 

I've run into a bit of an issue. I have two tables, one which lists all physical products in local currency and another which lists all transactions in the transaction currency. What I want is to append the rows containing service products (in bold) which are sold in local currency to the list of all the physical products. Also, I'm working with DirectQuery. (If not possible to do generally, there are only a dozen relevant products so doing it one-by-one by ie ProdID is feasible.) 

 

The relevant part of the tables look something like those under, though there are a number of unique columns to each:

PhysicalProducts

OrderNoProdIDProdNameCustomerRevenueCUR
100259ThingyBob1203NOK
101262WidgetKen9408NOK
101239GadgetKen2317NOK
102284WhatnotsRob423NOK

 

AllTransactions

OrderNoProdIDProdNameCustomerRevenueCUR
100259ThingyBob112USD
101262WidgetKen962EUR
101239GadgetKen255EUR
101230TransportationKen324NOK
102284WhatnotsRob423NOK

 

The outcome I'm after:

PhysicalProducts

OrderNoProdIDProdNameCustomerRevenueCUR
100259ThingyBob1203NOK
101262WidgetKen9408NOK
101239GadgetKen2317NOK
101230TransportationKen324NOK
102284WhatnotsRob423NOK

 

 

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sorry for the late reply, been trying (and failing) for a few days to make it work in every way I could imagine.

       

      Unfortunately, SQL isn't exactly my speciality, so I'll have to wait for others who are better at it to return from vacation. 

       

      Thank you for the suggestion!