Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Pedro_Rodriguez
New Contributor III

Concatenate field+variable in set analysis

Hi all,

I have a set analysis expression where I must concatenate a variable plus a field but I cannot make it work

=Only({<FIELD1={$(=$(vL.Model)&FIELD2)}>}FIELD3)

Can anyone help?

Thanks a lot in advance!

3 Replies
Highlighted
MVP
MVP

Re: Concatenate field+variable in set analysis

Ideally, this should work, if you have single value in scope for FIELD2. Could you share a sample qvw showing the issue?

Highlighted
MVP
MVP

Re: Concatenate field+variable in set analysis

Generally, the RHS expression is an aggregation (sum, max, etc). This is because the expression is evaluated once, before the sheet object is built.

It looks like you are trying to a do a row-by-row comparison, and set expression do not work that way.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
sushantwanjari
New Contributor

Re: Concatenate field+variable in set analysis

Lets say, you need to compare two fields such that

F1 = F2 & '_123'

eg. A_123 = A & '_123'

Define variables:

v_Suffix = '_123'

v_Filter = '''' & Concat(F2,$(v_Suffix)&''',''')&$(v) & ''''


Now use v_Filter in Set expression

=Only({<F1 = {$(v_Filter )}>} F3)

Hope it help you..

-Sushant