SOLVED

Specific Power Query Merge help

Copper Contributor

Hello, I have a very particulate situation within Power Query which I am not sure how to go about.

 

As a data source for a sales dashboard, I have a table within PQ where I have monthly sales to 5 clients. Each row has

 

MONTH; CLIENT; PRODUCT; QUANTITY; VALUE.

 

However, one client uses special discounts which no one else does, and so the VALUE column is empty. I have a sheet with PRICE/KG for the client (including discounts) so the solution is to multiply QUANTITY by this PRICE\KG to result in the correct VALUE. However, I am not sure how to go about merging the two tables so as to match only the CLIENT in question and do the actual multiplication. 

3 Replies
best response confirmed by dzhogov (Copper Contributor)
Solution

Hi @dzhogov ,

 

If I understood your logic correctly you may merge your main table with PRICE/KG on clients and add new column with condition if [VALUE]=null then [QUANTITY]*[PRICE/KG] else [VALUE], after that remove VALUE and PRICE/KG columns

@Sergei Baklan 

 

Thank you!

@dzhogov , you are welcome

1 best response

Accepted Solutions
best response confirmed by dzhogov (Copper Contributor)
Solution

Hi @dzhogov ,

 

If I understood your logic correctly you may merge your main table with PRICE/KG on clients and add new column with condition if [VALUE]=null then [QUANTITY]*[PRICE/KG] else [VALUE], after that remove VALUE and PRICE/KG columns

View solution in original post