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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.