How to Duplicate Query in Power BI

Cody Schneider••10 min read

Duplicating a query in Power BI is one of those simple actions that unlocks a much more efficient and powerful way to work with your data. It allows you to reuse, reshape, and experiment with your data models without starting from scratch every single time. This guide will walk you through exactly how to duplicate a query, explain the crucial difference between "Duplicating" and "Referencing," and show you practical examples of when to use each method.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Bother Duplicating Queries?

At first, copying a query might seem like a minor feature, but it's a foundational technique for building clean, scalable, and easy-to-manage Power BI reports. By creating copies of your queries, you can avoid redundant work and keep your data transformation logic organized.

Here are the main reasons why you'll want to master this skill:

  • Isolate and Test Changes: Want to try out a complex set of transformations but scared you might break your perfectly good query? Duplicate it first. This creates a safe sandbox where you can experiment freely. If you mess up, just delete the copy. If it works, you have a blueprint of the steps to apply to your original query.
  • Create Variations of a Dataset: Often, you need slightly different views of the same base data. For example, you might have a main "Sales Transactions" query. You could then create copies to build specialized tables like "High-Value Sales," "Refunded Transactions," or "Sales by Region." Each copy starts with the same data source but is filtered and transformed for a specific purpose.
  • Build Aggregated Summary Tables: It's a best practice in Power BI to do as much data aggregation as possible in the Power Query Editor before loading it into your data model. You can start with a detailed query (e.g., all website sessions) and create a referenced copy to summarize that data by month, traffic source, or landing page. This makes your Power BI report faster and your DAX formulas simpler.
  • Keep Your Logic Organized: Instead of having one massive query with dozens or even hundreds of transformation steps, you can use copies to break the logic down into manageable stages. You might have one query that just connects to the source and does initial cleaning, and then subsequent queries reference that "clean" base query to perform specific transformations.

Understanding the Difference: Duplicate vs. Reference a Query

This is the most important concept to grasp. In Power BI’s Power Query Editor, right-clicking a query gives you two options for making a copy: Duplicate and Reference. They seem similar, but they behave in fundamentally different ways.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

What Happens When You "Duplicate" a Query?

Think of Duplicate as making a complete, independent photocopy. When you duplicate a query, you create a brand-new query that contains all the exact same applied steps as the original, right from the initial "Source" step.

The new, duplicated query is a standalone entity. Once it’s created:

  • It is not linked to the original. Any changes you make to the duplicated query have zero effect on the original query.
  • Changes to the original do not affect the duplicate. If you go back and add or edit a step in the original query, your new duplicate will remain unchanged.
  • It re-connects to the data source independently. Both the original and duplicated queries will hit your data source (your database, Excel file, API, etc.) to refresh their data.

When to use Duplicate: Use it when you want to create two truly separate paths of transformation from the exact same starting point. For example, if you wanted to create one table of "UK Sales" and another of "US Sales" from a global sales file, duplicating the initial query and adding a different country filter to each is a perfect use case.

What Happens When You "Reference" a Query?

Think of Reference as creating a shortcut or a pointer to another query. When you reference a query, you create a new query whose only source step is the output of the query you are referencing. It does not copy all the steps from the original.

This creates a parent-child relationship between the queries:

  • It is directly linked to the original. The referenced query uses the final, processed result of the original query as its starting point.
  • Changes to the original flow down to the reference. If you go back and change a transformation step in the original ("parent") query, that change will automatically be reflected in the referenced ("child") query when data is refreshed. The child always inherits the latest result from the parent.
  • It does not re-connect to the original data source. Only the parent query connects to the external data source. The child query simply takes its data from the parent query inside your Power BI file.

When to use Reference: Use it when you want to perform a set of common, foundational transformations once, and then build other tables on top of that cleaned-up result. This is incredibly efficient. You can clean your main sales data in one query, then reference it multiple times to create different summary tables (sales by date, sales by customer, etc.) without re-doing the cleaning steps each time.

How to Duplicate a Query in Power BI (Step-by-Step)

Creating a standalone copy of your query is simple. You'll do this inside the Power Query Editor, which is Power BI's data transformation layer.

  1. Open the Power Query Editor: In the main Power BI Desktop window, go to the Home ribbon and click on the Transform data button. This will launch the Power Query Editor in a new window.
  2. Locate the Queries Pane: On the left-hand side of the Power Query Editor, you'll see a navigational pane that lists all of your current data queries.
  3. Right-Click and Duplicate: Find the query you want to make a copy of. Right-click on its name, and a context menu will appear. From this menu, select Duplicate.
  4. Rename Your New Query: Power BI will instantly create a new query, usually with a "(2)" appended to the name (e.g., "Sales Data (2)"). It’s a very good practice to immediately rename this query to something meaningful. Simply right-click the new query, select Rename, and give it a descriptive name like "US Sales."

That's it! You now have a completely independent copy. If you click on the new query, you'll see in the "Applied Steps" pane on the right that it contains an exact replica of all the steps from the original query.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

How to Reference a Query in Power BI (Step-by-Step)

Creating a dependent, referenced query is just as easy but results in a different structure.

  1. Open the Power Query Editor: Just as before, click on Transform data from the Home ribbon.
  2. Find Your Base Query: In the Queries pane on the left, locate the query you want to use as the foundation for your new query. This is your "parent" query.
  3. Right-Click and Reference: Right-click on the query's name. From the context menu, select Reference.
  4. Rename the Referenced Query: A new query will be created. Rename it to describe its purpose, for example, "Monthly Sales Summary."

Now, click on your new referenced query. Look at the "Applied Steps" pane. You will see it only has a single step called "Source." If you look at the formula bar, you'll see that the source is simply the name of the original query - for example, = #"Sales Data". This is the live link back to the parent query. From here, you can add new transformation steps like grouping or filtering that will only apply to this child query.

Practical Use Cases and Examples

Let's make this more concrete with a couple of real-world scenarios.

Example 1: Splitting Regional Data Using "Duplicate"

Imagine you have a single CSV file named GlobalSales that contains sales transactions from all over the world, with a column called "Country." You want to create two separate tables in your final model: one for North America (USA, Canada, Mexico) and one for Europe.

  1. Import the GlobalSales CSV. This creates your initial query. Perform some basic cleaning like promoting headers and setting data types.
  2. Duplicate the query twice. Right-click GlobalSales and duplicate it. Rename the copy NorthAmericaSales. Duplicate GlobalSales again and rename the second copy EuropeSales.
  3. Filter the first copy. Select the NorthAmericaSales query. Click the filter button on the "Country" column and select only "USA," "Canada," and "Mexico."
  4. Filter the second copy. Select the EuropeSales query. Filter its "Country" column to only include European countries.

Now you have two independent tables, each pulling from the same source file but filtered for different geographic regions. Changes to the North America query won't impact the Europe one.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Example 2: Creating Summary Tables Using "Reference"

This time, your source is a query named AllTransactions that contains detailed, granular sales data with millions of rows. It's already been cleaned - unnecessary columns removed, data types corrected, etc.

Loading millions of rows into your report model can make it slow. Instead, you want to create a few high-level summary tables.

  1. Start with your cleaned AllTransactions query.
  2. Create your first summary table. Right-click AllTransactions and select Reference. Rename the new query to MonthlyRevenue.
  3. In the MonthlyRevenue query, go to the Transform tab and select Group By. Group by the "Order Date" column (you can first transform it to be the start of the month) and calculate the sum of the "Sale Amount" column.
  4. Create a second summary table. Go back and right-click the original AllTransactions query again. Select Reference once more. Rename this new query SalesByProductCategory.
  5. In SalesByProductCategory, use Group By to group by the "Category" column and calculate the sum of "Sale Amount" and a count of "OrderID."

In this scenario, all the heavy cleaning is done just once in the parent AllTransactions query. The two summary tables are lightweight, fast, and inherit any future changes you make to the initial cleaning steps, saving you an enormous amount of work and keeping your model optimized.

Final Thoughts

Understanding when to duplicate versus reference a query is a key skill that elevates your work in Power BI. Duplicating creates independent forks for separate analyses, while referencing builds an efficient, tiered structure where core logic is defined once and reused. Mastering these two simple commands will help you create more organized, efficient, and scalable data models.

Building transformations like this in Power BI is powerful, but often the manual process of pulling data from different sources and clicking through transformations is still a time-consuming part of the job. At Graphed, we focus on cutting out these manual steps entirely. By connecting your tools - like Shopify, Google Analytics, or Salesforce - we can use natural language to automate the creation of entire dashboards. You can just ask, "Show me a chart of my monthly revenue by product category," and we handle the complex joins and data modeling for you, turning hours of work into a matter of seconds. Visit Graphed to see how we’re making data analysis as simple as having a conversation.

Related Articles