Forum Discussion
Nested Join with default key if null values
- 3 years ago
When merging queries, only base it on Fruit column.
Then add a custom column with below code to get the prices.
= let pColor = [Color] in Table.First(Table.Sort(Table.SelectRows([Referential], each [Color] = pColor or [Color] = ""), {"Color", Order.Descending}))[Price]Remove column "Referential".
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
When merging queries, only base it on Fruit column.
Then add a custom column with below code to get the prices.
= let pColor = [Color] in Table.First(Table.Sort(Table.SelectRows([Referential], each [Color] = pColor or [Color] = ""), {"Color", Order.Descending}))[Price]
Remove column "Referential".
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Jing,
Thank you so much for your quick support.
I just had to modify the custom column as follow and in works perfectly:
= Table.AddColumn(Source, "Personnalisé", each let pColor = [Color] in Table.First(Table.Sort(Table.SelectRows([Referential], each [Color] = pColor or [Color] = null), {"Color", Order.Descending}))[Price])
Next time, I will attach my file to help 😉
Thanks again and have a nice day,
Gaëlle.