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
masplin
Impactful Individual
Impactful Individual

Custom column failing to add to together numerical columns

I have 4 numerical columns that i tried to add together by just putting a "+" between the field names using the wizard, but it just produces null values.  the query is below

 

= Table.AddColumn(#"Changed Type7", "Custom", each [#"Exceptional Items pre GP#(lf)th GBP Last avail. yr"]+[#"Exceptional Items pre OP#(lf)th GBP Last avail. yr"]+[#"Exceptional Items#(lf)th GBP Last avail. yr"]+[#"Other Exceptional Items#(lf)th GBP Last avail. yr"])

However i found if I select the columns and use the statisitcs/sum function it works and query looks like this

 

= Table.AddColumn(#"Added Custom9", "Exceptionals", each List.Sum({ [#"Exceptional Items pre GP#(lf)th GBP Last avail. yr"],[#"Exceptional Items pre OP#(lf)th GBP Last avail. yr"],[#"Exceptional Items#(lf)th GBP Last avail. yr"],[#"Other Exceptional Items#(lf)th GBP Last avail. yr"]}),type number)

Can someone explain why just putting a "+" between field names doesn't work as sure i've used convetional mathematical operators before in custom columns?

 

Thanks for any advice

 

Mike

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@masplin

 

You might have null values in some columns

 

null + 10 = null in Power Query/M
But
List.Sum({10,null})=10

 

 

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@masplin

 

You might have null values in some columns

 

null + 10 = null in Power Query/M
But
List.Sum({10,null})=10

 

 

Yes lots of them. Thought a null was a blank, but there you go thanks for clarifyingi'm not doing somethig wrong

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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