How to Create a Reference Table in Power BI
Creating a reference table in Power BI is one of those simple actions that can completely change how you structure and manage your data reports. Instead of building one massive, complex query, you can separate different transformation paths from a single source, keeping your work clean, organized, and much easier to debug. This article will walk you through what a reference table is, why it's different from a duplicate, and how to create one with a few practical examples.
What Exactly is a Reference Table in Power BI?
In Power BI's Power Query Editor, creating a "reference" of a table (or query) means you're creating a new query that uses the output of an existing query as its starting point. Think of it as creating a branching path in your data transformation process. You have one main path that cleans and prepares your raw data, and then you can create several reference tables that branch off from that clean data to be used for different, specific analytical purposes.
This is incredibly useful when you want to perform different sets of steps on the same base data without messing up your original query. For example, you might have a main "SalesTransactions" query. From that, you could create:
- A reference query to summarize sales by region.
- Another reference query to filter for sales made in the last quarter.
- A third reference query to pull a unique list of all your products sold.
Each of these reference tables starts with the fully prepped data from "SalesTransactions" but then follows its own independent set of transformation steps. Most importantly, if you update the original "SalesTransactions" query (say, by adding a new calculated column), that update will automatically flow down to all the tables that reference it.
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.
Reference vs. Duplicate: Understanding the Key Difference
This is an important distinction, and a common point of confusion for new Power BI users. While "Duplicate" and "Reference" sound similar, they behave very differently in Power Query and have completely different use cases.
Duplicating a Query
When you duplicate a query, you are creating an exact, independent copy of that query, including every single one of its "Applied Steps". The new, duplicated query has no link back to the original. If you change a step in the original query, the duplicated query will not be affected. It's like taking a photocopy of a document, whatever you do to the original document later won't appear on your copy.
When to use Duplicate: You want a completely separate version of a query's logic as a starting point for something new, and you don't want future changes to the original to impact it.
Referencing a Query
As we've discussed, referencing a query creates a new query that is dependent on the original. Its source is not the raw data file, its source is the final result of the referenced query. If the original query is changed, those changes are passed directly to the referenced query before any of its own steps are applied.
When to use Reference: You have a single, common set of transformation "base" steps that you want to apply, and then you want to build multiple, different analytical outputs from that shared base. This is the more common and generally more efficient method for data modeling.
Step-by-Step Guide: How to Create a Reference Table
Creating a reference table is straightforward. The process takes place entirely within the Power Query Editor.
- Open the Power Query Editor: From the main Power BI Desktop window, go to the Home tab on the ribbon and click on Transform Data. This will open the Power Query Editor interface.
- Find Your Source Query: On the left side of the Power Query Editor, you'll see the Queries pane, which lists all the tables in your report. Identify the query you want to use as the base (for example,
AllSalesData). - Create the Reference: Right-click on the name of your source query (
AllSalesData). In the context menu that appears, select Reference. - Rename Your New Table: A new query will immediately appear in the Queries pane. By default, it might be named something like
AllSalesData (2). It's crucial for organizational purposes to rename it to something descriptive. For example, if you plan to use it to analyze sales from a specific country, you could rename itUS_Sales. Just double-click the name or right-click and choose "Rename."
That's it! Your new reference table is ready. If you look at its "Applied Steps" pane on the right-hand side, you'll see a single step called "Source." Clicking on the gear icon for that step will show the source pointing not to an external file, but to your original query: = AllSalesData. Now, you can start adding new transformation steps to this new query without affecting the original.
Putting It Into Practice: Examples
Let's look at a couple of basic business scenarios where reference tables are extremely helpful.
Example 1: Creating Filtered Tables for Specific Analysis
Imagine your base query, SalesData, contains global sales transactions for all products. You need to create separate analyses for specific regions and top-performing products without touching the original table.
- Start with your main
SalesDataquery loaded in Power Query. - Right-click
SalesDataand select Reference. Rename the new table toNorthAmerica_Sales. - With the
NorthAmerica_Salestable selected, find the "Region" column. - Click the filter dropdown arrow on the "Region" column header and select only "USA" and "Canada".
- Now, you have a table that only contains data for North America.
- Go back to the
SalesDataquery. Right-click it again, select Reference, and name this oneElectronics_Sales. - On this table, filter the "Category" column to show only "Electronics".
You now have three tables: the original SalesData with all transactions, NorthAmerica_Sales for regional reporting, and Electronics_Sales for category-specific dashboards. If you add a new calculated column for profit margin to the foundational SalesData query, that new column will automatically be available in both of the reference tables.
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: Making a Dimension Table from a Fact Table
This is a classic data modeling technique. Your main sales table (a "fact" table) contains transaction details, including customer information that is repeated for every purchase they make. You want a clean, unique list of your customers (a "dimension" table) to build relationships in your data model.
- Right-click your main
SalesDataquery and create a Reference. - Rename the new query
CustomerDimension. - In the
CustomerDimensiontable, you probably only need customer-specific columns. Select the columns you want to keep, likeCustomerID,CustomerName, andCity. - Right-click on one of the selected column headers and choose Remove Other Columns.
- You're left with just the customer details, but
CustomerIDs will still appear multiple times. To fix this, select theCustomerIDcolumn, go to the Home tab in the ribbon, and click Remove Rows > Remove Duplicates.
Now you have a clean list where each customer appears only once. This CustomerDimension table can then be linked to your main SalesData table in Power BI’s "Model" view, creating a robust and efficient data model.
Best Practices to Keep in Mind
- Use Descriptive Names:
Sales (2)is not helpful.Sales_Last_30_Daysis. Clear naming lets you understand your data model at a glance. - Organize with Groups: If you have many queries, you can right-click in the Queries pane and create "Groups" to act as folders. You could have one group for your source queries and another for dimension tables.
- Manage Data Load: Sometimes your base query is just a staging area for other queries and doesn’t need to be loaded into the final Power BI model. Right-click the base query and uncheck "Enable Load." The data will still refresh and flow to your reference tables, but it won't take up extra memory in the final report, helping to improve performance.
Final Thoughts
Creating reference tables is a fundamental skill for anyone looking to go beyond basic reports in Power BI. It allows for a much cleaner, more scalable, and efficient way to handle data transformations, enabling you to build sophisticated data models from a single, well-managed source of truth.
Of course, as you bring in more data from more sources, managing these transformations, even with reference tables, can still feel like manual work. At our company, we built Graphed to solve this very problem by automating the tedious parts of data prep and dashboard creation. Rather than manually building out queries, filtering, and removing duplicates, you can connect your sources (like Google Analytics, Shopify, or Salesforce) and simply ask in plain English for what you need - for instance, "Show me a chart of sales by city for our top 10 customers this quarter," and get an interactive dashboard in seconds.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.