How to Create a Blank Table in Power BI
While Power BI is fantastic at connecting to existing data, you'll often find yourself needing a table that doesn't exist in any of your data sources. Whether it’s for creating a dynamic slicer, organizing your DAX measures, or simply inputting a small list of static values, creating a blank table from scratch is a fundamental skill. This guide will walk you through the three main methods for creating a new, empty, or custom table directly within Power BI.
Why Bother Creating a Blank Table?
Before jumping into the "how," let's quickly cover the "why." Creating a table from scratch isn't just an ad-hoc task, it's a technique used to solve specific reporting challenges. Here are a few common scenarios where this comes in handy:
- Creating Parameter or Slicer Tables: Imagine you want to let users perform a "what-if" analysis, like seeing how a 5%, 10%, or 15% price increase would affect revenue. You can create a table containing those percentage values to use in a slicer, which then feeds into a DAX measure.
- Organizing Your Measures: Power BI models can get cluttered with dozens of DAX measures. A common best practice is to create a blank table, name it something like "_Measures," and store all your project-wide measures there. This tidies up your Fields pane and makes your model much easier to navigate.
- Building Scaffolding Tables: Sometimes you need to link two tables that don't have a direct relationship. For example, if you have Sales data and Target data that are at different granularities, you can create a common "master" calendar or product table to act as a bridge, allowing them to be analyzed together.
- Manual Data Input: For small, static lookup lists that aren't worth maintaining in a separate Excel file - like a list of sales regions and their managers, or a set of category names - you can type them directly into Power BI.
Method 1: Use 'Enter Data' for Quick and Simple Tables
The most straightforward way to create a new table is with the "Enter Data" feature. This is perfect for small, static datasets that you need to type or paste in manually.
Step-by-Step Instructions:
- Navigate to the Home Tab: Open your Power BI Desktop file. In the main ribbon at the top, make sure you are in the Home tab.
- Select "Enter Data": In the 'Data' section of the Home ribbon, click the Enter Data button. This will open a new window called 'Create Table.'
- Add Your Data: You'll see a grid that looks like a miniature spreadsheet. You can start typing data directly into the cells.
- Name Your Table: At the bottom of the window, you'll find a box labeled "Name." Give your new table a descriptive name like "Priority Slicer."
- Load the Table: Click the Load button. Power BI will add your new table to the data model, and it will appear in the Fields pane on the right-hand side, ready to be used in visuals or relationships.
When to use this method: Use the 'Enter Data' feature when you have a small list of values that are unlikely to change, such as status names, category lists, or simple parameters.
Method 2: Create a Table Using DAX (Data Analysis Expressions)
For more dynamic or calculated tables, DAX is your best friend. This method involves writing a formula that generates a table for you. This is ideal for things like date calendars or number series that would be tedious to enter manually.
Step-by-Step Instructions:
- Go to the Data View: In the left-hand navigation pane of Power BI Desktop, click on the table icon to switch to the Data View.
- Select "New Table": In the top ribbon, look for the 'Table Tools' tab (this will appear when you're in the Data View). Click the New Table button.
- Write Your DAX Formula: A formula bar will appear below the ribbon, waiting for your DAX expression. Here, you'll define the structure and content of your table.
Common DAX Functions for Creating Tables:
Using DATATABLE for Custom Tables
The DATATABLE function lets you define columns, data types, and the rows of data all in one expression.
Here’s the syntax:
DATATABLE ( ColumnName1, DataType1, ColumnName2, DataType2, ..., {{Value1, Value2, ...}, {ValueA, ValueB, ...}} )
For example, to create a table of sales goals:
Sales Goals =
DATATABLE(
"Region", STRING,
"Target Sales", CURRENCY,
{
{ "North", 150000 },
{ "South", 120000 },
{ "East", 210000 },
{ "West", 185000 }
}
)
Type this into the formula bar and press Enter. Your new 'Sales Goals' table will be generated instantly.
Using CALENDAR or CALENDARAUTO for Date Tables
A dedicated date table is a Power BI best practice. You can generate one automatically with DAX.
CALENDARAUTO(): This scans your entire data model for the earliest and latest dates and creates a continuous date table that covers that full range.
Date Table = CALENDARAUTO()
CALENDAR(StartDate, EndDate): If you need more control, this function creates a date table between specific start and end dates.
Date Table = CALENDAR(DATE(2023, 1, 1), DATE(2024, 12, 31))
When to use this method: Use DAX when you need a table based on a calculation, a series of dates or numbers, or when you need the table to adjust dynamically based on the data in your model (like with CALENDARAUTO).
Method 3: Start with a Blank Query in Power Query
The Power Query Editor is a powerful tool for data transformation, and you can also use it to build a table from scratch using M code. This approach is excellent for creating tables that might be a step in a larger, more complex data preparation process.
Step-by-Step Instructions:
- Open the Power Query Editor: On the Home tab of the main Power BI window, click Transform Data. This opens the Power Query Editor.
- Create a Blank Query: In the Power Query home ribbon, click the New Source dropdown, hover over Other, and choose Blank Query.
- Open the Advanced Editor: A new query will appear in the Queries pane (likely named "Query1"). With it selected, click the Advanced Editor button on the home ribbon.
- Write the M Code: You'll see a window with a few lines of default text. Delete that and replace it with your M code to define the table using the
#table()constructor.
The basic structure is #table(<column headers>, <list of rows>).
For example, let's create a table that maps Product IDs to their Category:
let
Source = #table(
type table [ProductID = text, Category = text],
{
{"A101", "Electronics"},
{"A102", "Electronics"},
{"B205", "Home Goods"},
{"B210", "Home Goods"},
{"C300", "Apparel"}
}
)
in
Source- Review and Finish: Click Done. You'll now see your generated table in the Power Query preview window. You can rename the query in the 'Query Settings' pane on the right.
- Load to the Model: Once you're happy with it, click Close & Apply in the top-left corner to load your new table into the main Power BI model.
When to use this method: Choose Power Query when your table creation is part of a repeatable data transformation workflow, if you need to perform additional steps on the new table before loading it, or if you simply prefer working with M code.
Which Method Should You Choose?
Deciding which method to use comes down to your specific goal:
- For small, static lists, stick with Enter Data. It's fast, visual, and simple.
- For dynamic calendars, number sequences, or programmatic tables, use DAX. It's powerful and integrates tightly with your data model.
- For tables that are part of an ETL process or require complex shaping before being loaded, Power Query is the most robust and scalable choice.
Final Thoughts
You can create new tables in Power BI in several ways, and each serves a different purpose. From the quick "Enter Data" for manual inputs, to the formulas in DAX for generating dynamic series, and finally to Power Query for more complex data modeling tasks, mastering these techniques helps you build more organized, flexible, and powerful reports.
Working through the steps in tools like Power BI is an essential skill, but it often involves a lot of clicking, code-writing, and learning an entire platform's quirks just to get the answers you need. A lot of the time-consuming and complicated parts of data analysis - like creating helper tables or organizing data for visualization - is what we trained our AI data analyst to handle automatically. By connecting your tools to Graphed, you skip right to the part where you ask questions in plain English - like "Compare revenue from Facebook Ads and Google Ads last month" - and get a complete dashboard in seconds without touching any settings in Power BI, or any other manual tool, for that matter!
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.