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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.

Top Kudoed Authors