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

Set expression using variable for field values

Hi All,

I have this requirement where:

1)I need to select a field(say Amount) from one table based on the matching client values in another table.

2.)There is no association between the two tables based on the client field, the association is required with some other field(Ekey).

Now, when I am creating a set expression using P(), it is working fine but when I am creating an expression using variable, it is not working in case I have more than one value for the Client field.

Ex:

sum({<EmpName=,B_ClientID=P(A_ClientID)>}Amount) is working for Emp1, Emp2

sum({<EmpName=,B_ClientID={"$(=vClient)"}>}Amount) is not working for Emp2, it is working for Emp1.

where vClient=Concat(Distinct A_ClientID,', ')

1.JPG

2.JPG

PFA the test qvw file for reference.

Due to some limitation, I need to use the variable set expression and not P() expression. Please suggest how this can be corrected.

Thanks,

Reema

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like in attached sample?

View solution in original post

2 Replies
tresesco
MVP
MVP

May be like in attached sample?

reema_dangwal
Contributor
Contributor
Author

Thanks that works.