Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Rothschild
Contributor II
Contributor II

Set Analasys not equal with varible

Hi,

I try to reach sum(qty) without selected customers.

First I put the selected customers in a varible:

v_cus=chr(39)&Concat(distinct name_customer,chr(39)&','&chr(39))&chr(39)/

Result: 'a','b','c'.

Then I tried to put the varible in not equal formula:

=sum({<name_customer=-{'$(=$(v_cus))'}>}qty)

It does not work.

Do you have an idea?

Labels (3)
9 Replies
Anil_Babu_Samineni

This should work

Variable: LET v_cus = '=chr(39)&Concat(distinct name_customer,chr(39)&'',''&chr(39))';

Expression: =sum({<name_customer-={$(v_cus)}>} qty)

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
Rothschild
Contributor II
Contributor II
Author

Thanks.

I create the var in the varible overview, Are there changes in syntax?

Anil_Babu_Samineni

Should work from varaible overview as well, Definition should be like below and then try?

=chr(39)&Concat(distinct name_customer,chr(39)&'',''&chr(39))

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
Rothschild
Contributor II
Contributor II
Author

One chr(39) missed in the beginning. (a','b','c')

Anil_Babu_Samineni

I would rather do simply like this : =Concat(distinct Chr(39) & name_customer & chr(39), ',')

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
Rothschild
Contributor II
Contributor II
Author

Again, one chr(39) is missing.

Anil_Babu_Samineni

This should work until unless you are doing some wrong? Can you simply try in Text box and share the screenshot?

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
Rothschild
Contributor II
Contributor II
Author

Maybe does anyone  have a solution??

Anil_Babu_Samineni

Will you be able to share sample application to demonstrate the same?

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