Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Expression

Hi Friends

I have given nested if using set analysis to retrieve the outstanding amount by comparing years.I dont know where i have done the mistake,i'm getting null result.Please help me out friends.

=if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN>='1' and CE_CLOSE_DT>Today(),(sum({$<Year={"vCurrentYear-2>vCurrentYear-1<vCurrentYear"}>}CE_AMT_LC_1))))


Regards

Krishna

14 Replies
tresesco
MVP
MVP

Could you just upload the qvw file? Having issue in extraction.

SunilChauhan
Champion II
Champion II

dont use 1 in sigle quotes as it is number we can have only text in ' '


use below code


if(CE_CLOSE_YN=1 and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN>=1 andCE_CLOSE_DT>Today(),(sum({$<Year={"$(vCurrentYear)-2>$(vCurrentYear)-1"}>}CE_AMT_LC_1))))


what year range do you want to have in your code?



hope this helps

Sunil Chauhan
krishna20
Specialist II
Specialist II
Author

Hi Sunil

1 is a flag in my QVD.years are 2014,2013,2012

Regards

krishna

SunilChauhan
Champion II
Champion II

try below code

if(CE_CLOSE_YN='1' and CE_CLOSE_DT<Today(),0,if(CE_CLOSE_YN>='1'and CE_CLOSE_DT>

Today(),(sum({$<Year={">=$(=Max(Year)-2)<=$(=Max(Year))"}>}CE_AMT_LC_1))))



hope this helps

Sunil Chauhan
krishna20
Specialist II
Specialist II
Author

Hi Sunil,

Its not working