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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
masplin
Impactful Individual
Impactful Individual

Referencing vs duplicating queries speed affect

Hi

 

I have a fialy complex query pulling in form multiple sql tables (one for each client) then a whole bunch of formatting and cleaning tasks.  This generates Table1.  The table contains 3 different dates (submitted, assigned and actioned) and my model needs 3 different tables so I can relate either of these dates to my date table. So i need to create 3 subset tables of this main table with each of the subsets only needing some subset of the columns.

 

I see I have 2 choices

1. start each subquery with Source=Table1 then remove the columns not required

2. for each subquery use reference to Table 1 

 

The question is in option 1 does each query get rerun in full whereas in reference only Table1 needs ot be run because then data already avaible to the other 3 i.e. is reference faster?  I understand the limitations of using reference later in the model but al lmy measures wil lbe independent. 

 

Thanks

Mike

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

Hi @masplin 

 

I would suggest using the second way.

 

As for the first way, you have to import this source four times totally even if you removed unnecessary columns. It is inefficient. If your source contains amount of data, it will take some time whether it is importing or refreshing.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

5 REPLIES 5
dotcs_farrellv
Frequent Visitor

I know this was marked as solved, but I think this artice provides a really good explanation and possible alternative solution if you need to manipulate the data they all have in common -  Referencing Power Query queries - Power BI | Microsoft Learn

 

Thanks for linking the article. Was super helpful in clarifying. Forums seem to have a lot of folks giving 'expert' advice and hurting instead of helping.

v-diye-msft
Community Support
Community Support

Hi @masplin 

 

I would suggest using the second way.

 

As for the first way, you have to import this source four times totally even if you removed unnecessary columns. It is inefficient. If your source contains amount of data, it will take some time whether it is importing or refreshing.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

I did not get it completely. But if you want to analyze data by three different dates. You can join all three with date dimension with one active and two inactive and you can use userelation to activate the relation

Ref :https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

If you are not looking for this then, Can you share sample data and sample out. If possible please share a sample pbix file after removing sensitive information.Thanks.

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @


Thanks. My Recent Blog -


Decoding Direct Query - Time Intelligence

Winner Coloring on MAP
,
HR Analytics


Power BI Working with Non-Standard Time
And
Comparing Data Across Date Ranges


Connect on Linkedin

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
masplin
Impactful Individual
Impactful Individual

sorry the question is does referencing reduce the number of times the data is recovered to just once, whereas repeating the query results in multiple calls for the same data?  Potentially the multi queries ot same data does not actually result in another cal las the dat is cached.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.