Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
joshcomputer1
Helper V
Helper V

Query Optimization by using previous query as source

I was curious if I am sourcing the same table for two different queries, should I reference the first query as my source for the second query? It is pointing to the same dataset.  Does this speed up the overall query (refresh of data)?  I have some tables that I source multiple times because the etl steps are different, but I am listing the source as the file table and not the previous query.  Will someone will experience with this chime in?

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @joshcomputer1

If i don't misunderstand you, reference the first query as my source for the other queries could improve the query performance.

 

You could refer to this article to get tips get Query Optimization.

https://docs.microsoft.com/en-us/power-bi/desktop-tips-and-tricks-for-creating-reports#reference-que...

 

if you have a base query A, and then two new queries B and C referencing A. A isn't loaded to report but B and C are.( uncheck "enable load" for queryA.

When you hit the Apply button, B and C will simultaneously start loading to report.

 

PowerQuery evaluations keeps a cache of data seen by evaluations on disk.

So if you are within the same cache session and pulled on A multiple times, you will essentially only pay for it the first time.

This cache will ONLY apply to raw data coming from the data source, any additional transformations will need to be performed on top of it.

Finally, since when you load queries to report, you always want the latest data. So each loading session is essentially a new cache session.

 

In a summary, You will only need to pay for the data coming from data source A ONCE per loading all of the queries. 

However, you will pay for the transformations on top of A N times where N = the number of queries been loaded.

 

 

Best Regards

Maggie

 

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @joshcomputer1

If i don't misunderstand you, reference the first query as my source for the other queries could improve the query performance.

 

You could refer to this article to get tips get Query Optimization.

https://docs.microsoft.com/en-us/power-bi/desktop-tips-and-tricks-for-creating-reports#reference-que...

 

if you have a base query A, and then two new queries B and C referencing A. A isn't loaded to report but B and C are.( uncheck "enable load" for queryA.

When you hit the Apply button, B and C will simultaneously start loading to report.

 

PowerQuery evaluations keeps a cache of data seen by evaluations on disk.

So if you are within the same cache session and pulled on A multiple times, you will essentially only pay for it the first time.

This cache will ONLY apply to raw data coming from the data source, any additional transformations will need to be performed on top of it.

Finally, since when you load queries to report, you always want the latest data. So each loading session is essentially a new cache session.

 

In a summary, You will only need to pay for the data coming from data source A ONCE per loading all of the queries. 

However, you will pay for the transformations on top of A N times where N = the number of queries been loaded.

 

 

Best Regards

Maggie

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors