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


1 Solution

Accepted Solutions
Anil_Babu_Samineni

My Bad, You should've change into If level as well

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

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

OR

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

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=$(vDay) <=$(vDay1)"} >}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

View solution in original post

12 Replies
devarasu07
Master II
Master II

Hi,

Can you try like below,

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

or try this way

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


Thanks,

Deva

Anil_Babu_Samineni

I already explain, To each From and To buckets you need Double Quotes "" not single one as Set analysis is good for setting. Let's try now

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

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

OR

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

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=$(vDay) <=$(vDay1)"} >}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 Deva

Thank you very much it work fine.

Paul Yeo

paulyeo11
Master
Master
Author

Hi Anil

I have test your expression , it does not work. Since Deva expression is working fine. i am using it. Thank you for your help.

Paul

Anil_Babu_Samineni

My Bad, You should've change into If level as well

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

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

OR

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

Sum({<SEGMENT -= {'Related Coy'},aging_ar = {">=$(vDay) <=$(vDay1)"} >}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


Now your expression is working fine. and display the correct amount .


Deva table 1A display 11,766 is correct.

Anil Table 1B display 11,616 is wrong. ( As your expression does not filter Comms Technology Pte LTd amount 150 )


Not sure why ?


Paul

Anil_Babu_Samineni

Hi Anil

Now your expression is working fine. and display the correct amount .

Anil Table 1B display 11,616 is wrong

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

My typing mistake , Table 1B is correct.

Paul

Anil_Babu_Samineni

Quotes in Set Analysis May be helps

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