Managing connections

Michlus

New member
Joined
May 10, 2016
Messages
12
Reaction score
0
Points
0
Hi.
I have PQ retrieving data from 2 SQL scripts.
I'm doing many manipulations, merges etc throughout some 15 connection-only queries.
I have 2 main outputs which I use with pivot tables.
One output (output1) is derived from one SQL datasource (loaded into a table, but I'm planning to change that to Data Model only).
The second output is derived from the second SQL script + also output1 (it does calculations and comparisons).
Here is my problem:
How do I ensure that the connection to the first datasource is evoked only once?
Currently, whatever order I refresh the pivot tables (or engage the connections), it will always fetch the data from the datasource1 TWICE: once, triggered by the first connection/output, and the second time - triggered by the second connection/output (which as mentioned requires data from both datasources for calculations).
Any help would be greatly appreciated.
Michel
 
does it make any sense to move the calculations?


can you do what you need on the server in a stored procedure or two that call and return to each other so that you only have to manage one round trip instead of managing many in power query? idk if thats possible in your environment.
good luck
 
can you do what you need on the server in a stored procedure or two that call and return to each other so that you only have to manage one round trip instead of managing many in power query? idk if thats possible in your environment.
good luck

Thank you for your reply.
No, I'm afraid that this is impossible. This is a Production DB; I can't change anything on it, only select query.
Are you saying that it's impossible to have a PQ query use the output data from another PQ query, without triggering it to fetch (again) the data from the DB?
 
Back
Top