Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a number of Direct Query queries in my Data Transform view. It works fine until I try to put a merge in one of them.
I have found a workaround which is to simply duplicate the query, then apply the merge to the duplicate.
However, the error message is a little strange: "Query [TABLE NAME] (step 'Merged Queries') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.".
Is this the best way around the problem? Is there a neater solution?
Does the error message I'm getting correctly reflect the problem I'm having?
Hi @AndrewPF,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @Natarajan_M and @BeaBF for prompt and helpful responses.
Great to hear that it’s working as expected on your end!
This behavior is due to a Direct Query limitation related to Power BI’s data privacy (firewall), where the engine cannot guarantee that both queries come from the same source, which blocks the merge operation.
Switching to Import mode removes this restriction, which is why your approach works fine.
I’d suggest marking your approach as the solution so it can help others facing the same Direct Query firewall limitation.
Thanks & Regards,
Prasanna Kumar
Thank for your replies but I'm still getting issues even when I use the duplicates solution. I have changed the DQ to import and the problem has gone. As far as I can gather, my data will still refresh (I don't need it in real time).
@AndrewPF : This error is specific to the Direct query mode as PBI engine cant confirm if they are from the same source and it will work without any issues for Import mode.
Thanks
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Yes, the error message is basically pointing to the right issue.
What’s happening is that when you add a merge in DirectQuery, Power Query can treat it as a “data combination” and the privacy/firewall logic kicks in. That’s why it complains about referencing other queries.
Your workaround (duplicate + merge) works, but it’s more of a patch than a clean solution.
Cleaner options would be:
If both tables come from the same source, do the join directly at the source (e.g. SQL view) → best for DirectQuery
Or make sure the merge can fully fold (same source, simple steps, no intermediate query dependencies)
Also check privacy levels, as mismatches can trigger this exact error
BBF
Hi @AndrewPF ,
I believe PBI's Firewall is blocking the merge by assuming that it involves two different query contexts, because it cant guarante that they are from the same source.
QQ : can you push the merge into the DB joins if the tables are coming from the same source ?
Also did you check whether you are getting the same error when you reference the query instead of the duplicate ?
Thanks
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 6 | |
| 5 | |
| 5 |