Forum Discussion

Simon_1981's avatar
Simon_1981
Frequent Visitor
1 year ago
Solved

Power Query - Try inner join if second table exists otherwise skip inner join step

Good morning Power Query experts,   I am looking for a way to inner join table A with table B based on the condition that table B exists.  How can I skip this inner join step if table B does not e...
  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    1 year ago

    The way PQ works is that a query needs to exist. The output of your query will be TableB. If you don't receive TableB, the result of your query should be a blank TableB. 

    You will need to write your query in that way only. 

    Hence, your query needs to say if no applicable data, then no output. 

    Now, if you query churns out a text called "no applicable data", then you query should say

    if previous step =  "no applicable data then TableA else your join statement