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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
jusTodd
Advocate IV
Advocate IV

Nulls transformed to 0 reverted back to null

I am curious to know if this is expected behavior in Power Query.

 

I have a couple of columns that are Lat/Long, which I transformed all null values to be zero.  Then, I added a Custom column to calculate Radians on those columns.

 

I came up with nulls trying to add another Custom column and started stepping through it and discovered that values previously changed from null to zero had reverted back to null.

 

Is this normal?

 

Here is the snippet that is giving me grief.  There is nothing special before or after. I removed some columns before this and changed some types after.

 

 

 

#"Replaced Value - nulls" = Table.ReplaceValue(#"Filtered Rows",null,0,Replacer.ReplaceValue,{"USERLong", "USERLat", "LOCLat", "LOCLong"}),

#"Added Custom UserLatRad" = Table.AddColumn(#"Renamed Columns", "USERLatRad", each (Number.PI/180)*[USERLat])

 

 

If it makes a difference, the transformations on this table are coming from a merge of 3 different tables that orginiate in API.

 

 

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

The table argument of your Table.AddColumn function is referring to the wrong table.

Probably it should read 

#"Added Custom UserLatRad" = Table.AddColumn(#"Replaced Value", ... 

 

View solution in original post

2 REPLIES 2
jusTodd
Advocate IV
Advocate IV

@ronrsnfld ... Thank you!  Copied those steps in from another space I had been working in, and never even considered that.  That fixed it!   Appreciate the help.

ronrsnfld
Super User
Super User

The table argument of your Table.AddColumn function is referring to the wrong table.

Probably it should read 

#"Added Custom UserLatRad" = Table.AddColumn(#"Replaced Value", ... 

 

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors