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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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)

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
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