Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to calculate with NULL values included

Hi Community,

I would like to make calculations on a table.

Sourcedata:

Table 1.PNG

I tried to make a calculated field in my load script:

(Column2+Column3) as 'CalculatedColumn'

But the output of "CalculatedColumn" is empty in my charts where Column 1 is 2.

I expected 150.000 + 0 is 150.000 and 300.000+0=300.000.

Could anyone tell me why this column is empty?

Thanks in advance.

1 Solution

Accepted Solutions
Thiago_Justen_

Pascal,

Try this out:

In a simple table:

Dimensions: column 1, column 2 and column 3

Expression: RangeSum([column 2],[column 3])


Or

Expression: Sum([column 2]) + Sum(If(Not IsNull([column 3]),[column 3],0))


Cheers

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago

View solution in original post

3 Replies
Thiago_Justen_

Pascal,

Try this out:

In a simple table:

Dimensions: column 1, column 2 and column 3

Expression: RangeSum([column 2],[column 3])


Or

Expression: Sum([column 2]) + Sum(If(Not IsNull([column 3]),[column 3],0))


Cheers

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anonymous
Not applicable
Author

Rangesum was solution, thank you!

By the way, I did it in load script

Thiago_Justen_

Pretty good Pascal. Happy to help you

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago