cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GLMHIWM Frequent Visitor
Frequent Visitor

Simple SUM of two columns not working (only null values returned)

Hi,

 

I am having a strange problem in the query editor (in Power BI). I want to add a new column that is the SUM of two columns in the same table:

Imagen 6.png

 

Imagen 7.png

 

 

It's really strange, if the formula for PASok is just a SUM of the other 2 columns that have some values, how can the new column only return null values? any idea what can be going on here?

 

Thank you very much

1 ACCEPTED SOLUTION

Accepted Solutions
mcybulski Member
Member

Re: Simple SUM of two columns not working (only null values returned)

The + operator is returning a null because the [PAS] field is null ( number + null = null). This behavior is standard for all operators within PQ (+,-,/,*) and sql. You can override this behavior with List.Sum. List.Sum ignores nulls by definition.

 

List.Sum( { [Services Proactive], [PAS] } )

View solution in original post

2 REPLIES 2
mcybulski Member
Member

Re: Simple SUM of two columns not working (only null values returned)

The + operator is returning a null because the [PAS] field is null ( number + null = null). This behavior is standard for all operators within PQ (+,-,/,*) and sql. You can override this behavior with List.Sum. List.Sum ignores nulls by definition.

 

List.Sum( { [Services Proactive], [PAS] } )

View solution in original post

GLMHIWM Frequent Visitor
Frequent Visitor

Re: Simple SUM of two columns not working (only null values returned)

Ok, thank you very much.

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)