Hello all,
I´m looking for a solution, to use something similar like VLOOKUP in a power query with two conditions.
We have a list of items/products, that is produced in one country.
These products are now sold in multiple different countries from the production country.
Now I would like to check if the countries are maintained correctly. We see on the first item, that´s available in 4 countries, but the source is inactive. "China" is inactive as well, so we need to maintain "Germany" and "France".
The second item is everywhere "active", so no action needed.
On the third item we see the source active, but "Germany" is inactive, so it needs corrected.
So I tried a VLOOKUP (in German "Sverweis") to figure out the correct combination. As there are multiple items and multiple enties about the production location, I had to do a combination of both. Also that combination does not look really nice in the table. And in addition I would prefere to have it Power Query.
Has somebody an idea, where I can start from? 🙂
I am a bit confused as to what you want the end result to look like. Please mock up a solution so we have a better idea.
Hello Alan,rnwell, I have a list, with muliple items, and these items are sold in multiple countries.rn(coulum F & coulmn I)rnAll of these items are sourced from one country (source of thruth) (column H)rn rnNow we have in that source of truth an item status, like active, or inactive and all othere items have to follow this.rn rnI would now like to see, which item has in all countries the same status as in the source of truth.rnrn rnSo in this example, the item A100 is procuded in USA. That region is inactive, so all other countries need to be on inactive as well.rnChina is already inactive, thats good, no action required. Germany and France are active, and habe to turn to inactive.rn
Hi thenewbee,
From what I understand, this is what I propose.
1. You load your data in PwQ (t_source).
2. You duplicate this array and name it t_transfo. This will be the final result.
3. With t_source, you filter by 'produced in' and 'sold in' to get only 'USA'. You will have the unique status.
4. With t_transfo, you merge this table with the t_source table, keeping only the status column.
I did all this in the 'Source&Transfo' sheet.
BR,
Lionel
Hi all,
I´m sorry, that my previous post has no structure. There went something wrong by submitting them. 🙁
@ Lionel,
many thanks for this, it has a good starting point 🙂
In this case the results are correct.
The challange is, that you filtered only 'sold in' to get only 'USA'. You did this, as your understanding from column 'produced in' was always USA. I´m looking for that link.
If we change the production location for item "A100" in Germany and France, to Germany, they should follow that status.
So "A100" is produces in Europe in Germany. As Germany is active, France should be active as well.
For China and USA the production location will USA. As USA is now inactive, China should inactive as well.
Hi thenewbee,
Here is the correction according to my understanding. 😉
BR,
Lionel
Bonjour Lionel,
many thanks for this, that´s looks great 🙂