Forum Discussion
MarcaSolkanar
4 years agoRegular Visitor
Multiple active table relation: IF exist 1st relation THEN use it, ELSE use other
Dears ❤️ I would like to create a conditional relation between two tables. To be more explicative as possible, I have a table (Database1) with Purchase Request created in a site [Division], and ...
v-kkf-msft
4 years agoCommunity Support
Hi MarcaSolkanar ,
Please add the custom column in PQ.
Tab =
let
a = [Material],
b = [Division],
SelectRows1 = Table.SelectRows(Contracts, each [Material] = a and [Division] = b),
SelectRows2 = Table.SelectRows(Contracts, each [Material] = a)
in
if Table.IsEmpty(SelectRows1) then SelectRows2 else SelectRows1
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MarcaSolkanar
4 years agoRegular Visitor
Hi v-kkf-msft ,
first of all thank you for your answer.
I'm trying to apply you formula but I don't know why it's taking so long and with this data weight in the window.
I created a Custom Column in Power Query
Consider that the data source is for PR just 2 MB, and contracts 500 kB.
I wait for the message to end.