Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Expression

Hi Friends

I have created a variable for the Risk Day which is as follows

vh1=(RISK_DAY>=1 and RISK_DAY<=14)

Now I want to apply this vh1 to expression which is follows

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

But this expression does not show the required results. Pls correct my expression

1 Solution

Accepted Solutions
tresesco
MVP
MVP

If you are using SET, try removing single quotes from outside and put inside like:

SET vh1 = {'>=1 <=14'} ;

View solution in original post

11 Replies
tresesco
MVP
MVP

Try changing variable definition like :

vh1= '{>=1 <=14}'

Anil_Babu_Samineni

Yesterday, I learn this from sunny

SET vh1 = '{>=1 <=14}'

Then, Use below

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
upaliwije
Creator II
Creator II
Author

Hi Anil

What I did was like this

Screenshot_1.png

Then the Variable look like this

Screenshot_2.png

Still result show is 0

Pls advise whether  what I have done is correct

its_anandrjs

Why not try with this

=sum({<POL_TYPE={'N'},RISK_YEAR = {$(=Max(RISK_YEAR)-1)},RISK_DAY = { $( ">=1 <=14" ) } >}Nos)


Or


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

upaliwije
Creator II
Creator II
Author

Sorry further to that there is an error mark in the expression as well

Screenshot_3.png

Anil_Babu_Samineni

May be this?

SET vh1 = '{">=1 <=14"}'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Don't worry about error , That is Bug only not yet resolved

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

If you are using SET, try removing single quotes from outside and put inside like:

SET vh1 = {'>=1 <=14'} ;

upaliwije
Creator II
Creator II
Author

Still result shown is 0