Forum Discussion
Power Query - Try inner join if second table exists otherwise skip inner join step
- 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
Use this conditional statememt
= if Table.IsEmpty(TableB) then TableA else your join statement
- Simon_19811 year agoFrequent Visitor
Hey Vijay, thank you for your fast reply and help.
Does this also work if table B does not exist at all?
If there currently are no open orders I do not even get a table at all instead I only get a line saying "no applicable data".
Many regards,
Simon
- Vijay_A_Verma1 year agoMost Valuable Professional
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