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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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