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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
hagosusng
Frequent Visitor

Replacing Nan with the value of the previous non-NaN row in the same column

Hi,

 

I want to convert all the NaN into the value of the previous row that have a non NaN value. Please can anyone help me.

 

hagosusng_0-1683566997224.png

I have looked uo the below link, but it wasn't helpful

 

Solved: Power Query- how to replace null with previous row... - Microsoft Power BI Community

 

Thank you in advance 

hagosusng_1-1683567135876.png

 

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @hagosusng 

you can Replace Values "NaN" with null then Fill Down

View solution in original post

@hagosusng 

You need to do this data transformation using power query. Open the query editor as per the following screenshot 

6FD2B05F-01F4-4C0C-BC08-9C123ECF0D58.png

 Right click on the column that you want to perform transformation on and select "replace values" then right click again and select "fill" "down"

 

View solution in original post

4 REPLIES 4
hagosusng
Frequent Visitor

I have the data in PowerBI

hagosusng
Frequent Visitor

Ho do i Fill Down?

@hagosusng 

You need to do this data transformation using power query. Open the query editor as per the following screenshot 

6FD2B05F-01F4-4C0C-BC08-9C123ECF0D58.png

 Right click on the column that you want to perform transformation on and select "replace values" then right click again and select "fill" "down"

 

tamerj1
Super User
Super User

Hi @hagosusng 

you can Replace Values "NaN" with null then Fill Down

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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