Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

Expression Error

Hello, 

I have a table as shown below,


1.PNG

 

 

 

 

 

 

 

 

 

 

I am calculating POC-Dec POC = (Current month POC)-(Last year December Month's POC)

(Sum({<Cost_Code={8}>}POC)
-
Above(TOTAL Sum({<MonthYear,Year,Cost_Code={8}>}POC), Num(Month)))

The expression is working fine, but when there is no Last year December month POC, it is showing as null value as shown in the above image;

Eg: 4.20-0= 4.20

3.80-0=3.80

How to fix this issue? attached is file for reference. 

thanks

Bhavesh

 

 

Labels (1)
2 Solutions

Accepted Solutions
pradosh_thakur
Master II
Master II

(Sum({<Cost_Code={8}>}POC)
-
alt(Above(TOTAL Sum({<MonthYear,Year,Cost_Code={8}>}POC), Num(Month)),0)
)
Learning never stops.

View solution in original post

sunny_talwar

Or use RangeSum to add two numbers where one of them can be null()

RangeSum(Sum({<Cost_Code={8}>}POC),
-Above(TOTAL Sum({<MonthYear,Year,Cost_Code={8}>}POC), Num(Month)))

 

View solution in original post

3 Replies
pradosh_thakur
Master II
Master II

(Sum({<Cost_Code={8}>}POC)
-
alt(Above(TOTAL Sum({<MonthYear,Year,Cost_Code={8}>}POC), Num(Month)),0)
)
Learning never stops.
sunny_talwar

Or use RangeSum to add two numbers where one of them can be null()

RangeSum(Sum({<Cost_Code={8}>}POC),
-Above(TOTAL Sum({<MonthYear,Year,Cost_Code={8}>}POC), Num(Month)))

 

bhaveshp90
Creator III
Creator III
Author

thank you @sunny_talwar