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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chris2001
Regular Visitor

Reference vs Duplicate - using subset of data from main query

Hello,

I am querying my main database and it is huge!  Once I connect to the server, I only add product item so that I can filter on the products I need and not the whole database.   I have filterer the products and added all the other columns I needed i.e. quantities, stores, transaction date, etc. to get the table of data I need to create visuals.  This main query can be refreshed daily but it does take a long time... Now that I have created this filtered table connected to the main database, I find that I can't add measures as the query goes back to the main database and times out because it's too big.  Should I duplicate the filtered results and use that to create my measures.  How will the data refresh if it's a duplicate?

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @chris2001 ,

 

Based on this document about Reference and Duplicate query, When a query references a second query, it's as though the steps in the second query are combined with, and run before, the steps in the first query. So The Duplicate is as the same thing, combine the query manually. But reference queries can avoid the duplication of logic across your queries. 

 

It seems that you want to only get parts of data based on product type? Have you tried to assign native sql statement when connecting the data source, so that it will only retrive the nessary data from source?

 

We also cannot understand what you mean "can't add measures", measure is like a formula, does not store data and only calculate when nessary, are you meaning create calculated table or anything else?


Best regards,

 

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

If you are using direct query, you should get help from a DBA to optimise the queries (even if you are using import mode, your refresh may also benefit). 

if you are using import mode, then you can add measures at any time without the need to go back to the database. Maybe something different is happening. Are you sure you have your terminology right?



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors