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

Null Values in Above() function produce wrong results

Hi,

I'm using following expression to get my accumulation values. but if I get any null values in the dimension then my accumulation sum is giving wrong result. Can some one help me on this?

=Range Sum(Above(TOTAL sum(SYSTEMS),0, Row No(TOTAL)))

Acc.PNG

 

 

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

It's not an error within the above-function else within your table-design - in which for any reasons some countries are listed twice. If you remove the cause of it the above() will work again like expected.

Alternatively you may try to identify the NULL or maybe counting the number of countries within your table to adjust your expression but it could become difficult - nevertheless you may try something like this:

Range Sum(Above(TOTAL if(len(ExpressionForMaxSystems), sum(SYSTEMS), 0),0, Row No(TOTAL)))

- Marcus

View solution in original post

6 Replies
lorenzoconforti
Specialist II

Works fine for me. Can you share your dashboard? 

sunny_talwar

Would you be able to share a sample where we can see the issue?

MuraliPrasath
Creator III
Author

I'm using Qlik Sense Cloud. How can I share my app? 

marcus_sommer

It's not an error within the above-function else within your table-design - in which for any reasons some countries are listed twice. If you remove the cause of it the above() will work again like expected.

Alternatively you may try to identify the NULL or maybe counting the number of countries within your table to adjust your expression but it could become difficult - nevertheless you may try something like this:

Range Sum(Above(TOTAL if(len(ExpressionForMaxSystems), sum(SYSTEMS), 0),0, Row No(TOTAL)))

- Marcus

MuraliPrasath
Creator III
Author

Thanks you! I had data model issues with the key field that causes duplicates and fixed it now and it works fine. 

Have a great day. Stay safe at home. Thanks😊