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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Date Variable

Hi,

I have created a date variable in QV app

vP16={'>={15-AUG-2016} <={01-SEP-2016'}

How ever this return 0 vale when applied in following expression

sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DATE=$(vP16)>}Nos)

Pls advise where I have made the mistake

1 Solution

Accepted Solutions
Kushal_Chawda

vP16='>=15-AUG-2016 <=01-SEP-2016'

sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DATE={$(vP16)}>}Nos)

there will be error but it will work

View solution in original post

5 Replies
Kushal_Chawda

why don't you directly write in set analysis instead of creating variable

sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DATE={'>=15-AUG-2016 <=01-SEP-2016'}>}Nos)

or

vP16='>=15-AUG-2016 <=01-SEP-2016'

sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DATE={'$(vP16)'}>}Nos)

upaliwije
Creator II
Creator II
Author

Thanks Kushal

In fact I have several expression in doc so it is easy for me to use a variable. However your expression works but not when the expression with variable is applied. I feel something wrong with the definition of variable. Pls advise.

Kushal_Chawda

vP16='>=15-AUG-2016 <=01-SEP-2016'

sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DATE={$(vP16)}>}Nos)

there will be error but it will work

upaliwije
Creator II
Creator II
Author

Thanks a lot

arasaraja_cts
Partner - Contributor III
Partner - Contributor III

Hi,

PFA, hope it will help.

Thanks

Raja.