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: 
paulyeo11
Master
Master

Expression work for 1 variable but not work for 2 variable

Hi All

I have create a variable = Days

and i insert the above variable to below expression , it work fine :-

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=$(=vDay)'} >}total_ar  * 1) > 0,


Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=$(=vDay)'} >}total_ar  * 1))


Due to i need to add one more variable , so i create one more variable = Days1


and again i insert to my expression , but it cannot work.

If(Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=$(=vDay)''<=$(=vDay1')} >}total_ar  * 1) > 0,


Sum({<SEGMENT -= {'Related Coy'},aging_ar = {'>=$(=vDay)''<=$(=vDay1)'} >}total_ar  * 1))


Hope some one can share with me where i go wrong ?


Paul


12 Replies
paulyeo11
Master
Master
Author

Hi Anil

Thank you for your link , yes , i think it is due to the expression reduce to one line from two line. ( I have forgotten why i need 2 line of expression )

Paul

Anil_Babu_Samineni

Because, You want to get only more than 0 values. So, The thought is If..Else.. Condition only. To do in single line. You may try this?

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=$(vDay) <=$(vDay1)"}, total_ar = {"=Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=$(vDay) <=$(vDay1)"} >}total_ar  * 1)>0"} >}total_ar  * 1)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
paulyeo11
Master
Master
Author

Hi Anil

Thank you very much for the signal line expression , But the signal line expression seem very long , and more difficult to maintenance.

I will stick with the orgnial expression. Now i am happy that i can reduce the 5 number tab to signal tab.

Paul