Others

How to Repeat Column Values Based on Another Column in Power BI

Maira MehtabMaira Mehtab Oct 29, 2026 869 views

Question details

The user needs to repeat or fill a specific value in one column based on a matching condition or value found in another column.

How to Repeat Column Values Based on Another Column in Power BI
Product
Power BI
Device & OS
not provided
Scenario
Transforming and modeling data to ensure specific rows inherit values based on a corresponding identifier, such as a sales order number.
Observed behavior
Looking for the correct DAX or Power Query methodology to dynamically populate a column's values based on related column data.
Before you start

Ensure your dataset is successfully imported into Power BI Desktop and identify the specific key column that will act as the logical condition for repeating your values.

Solution 1Recommended

Use Power Query to Add a Conditional Column

Power Query is the most efficient way to transform data before loading it into your model by adding conditional logic to generate repeating values.

Performing row-level transformations in Power Query is generally recommended over using DAX. It improves model performance by processing the logic during the data load phase rather than calculating it on the fly.

1
Launch Power Query Editor

Open Power BI Desktop and click on 'Transform Data' in the Home ribbon to launch the Power Query Editor.

2
Select the Target Table

From the Queries pane on the left side of the window, select the table you want to modify.

3
Add a Conditional Column

Navigate to the 'Add Column' tab at the top and click on 'Conditional Column'.

4
Define the Logic

In the dialog box, set up your IF/THEN logic. For example: If 'Sales Order' equals '1001', then output 'a'. You can add multiple clauses as needed.

5
Apply Changes

Click 'OK' to create the column, then go back to the Home tab and select 'Close & Apply' to save your transformations to the data model.

Use Power Query to Add a Conditional Column
Alternative: Fill Down: If your data is sorted and you simply need to repeat a value until a new one appears, you can right-click the column header in Power Query, select 'Fill', and choose 'Down'.
Free Microsoft Office alternative

Prepare and Clean Your Data Seamlessly with WPS Office

While Power BI is an excellent tool for data visualization, the process of cleaning and preparing data often begins in a spreadsheet. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office, making it incredibly easy to use VLOOKUP and IF functions to repeat column values before importing your datasets into BI tools.

Fully compatible with Microsoft Excel formats (.xlsx, .csv) for seamless data preparation.Familiar spreadsheet interface makes writing IF statements and conditional formatting intuitive.Free and lightweight, ensuring smooth performance even when handling large datasets.Easily structure and clean your data locally before importing it into Power BI.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use VLOOKUP in Power BI to repeat values like I do in Excel?

Power BI does not use the VLOOKUP function. Instead, you can use the LOOKUPVALUE DAX function or merge queries in the Power Query Editor to achieve the exact same result of pulling and repeating values based on matching columns.

How do I fill empty cells with the value from the row above in Power BI?

Open the Power Query Editor, select the column containing the null or empty cells, right-click the column header, select 'Fill', and then click 'Down'. This command will repeat the topmost value downwards until it encounters a new value.

Why is my DAX calculated column not returning the repeated values correctly?

Ensure that your DAX formula references the correct table and column names. If you are attempting to look up a value from an entirely different table, verify that a valid relationship exists between the two tables in your Data Model view.

Is it better to create conditional columns in Power Query or using DAX?

It is generally considered best practice to perform row-level transformations and create conditional columns in Power Query before the data loads. This method significantly improves overall model performance and allows for better data compression compared to DAX calculated columns.