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

Filter on Concatenated results

hi,

I have a table with concatenated results,

my problem begins when using  a filter, on the concatenated values,

the output i would expect is to see all concatenations that contains the chosen value from the filter

example of the problem:

as you can see in the picture above, the concatenated column is partially,

in this example, the correct answer is to show all of the upgrade names for this specific ad

thanks in advance

nir

2 Replies
Anonymous
Not applicable
Author

Hi nir

I got the solution

try the below code

Test:

LOAD * INLINE [

    Ad id, UpgradeName

    1, Basic

    1, SCO Boost

    1, industry Boost

    2, test

    2, test1

];

AD_ID:

LOAD

Distinct

[Ad id] as Distinct_AD

Resident

Test;

for i= 1 to NoOfRows('AD_ID')

  let where_Val=FieldValue('Distinct_AD',$(i));

  Test2:

  NoConcatenate

  LOAD

  [Ad id],UpgradeName as UpgradeName_New  Resident Test Where [Ad id]=$(where_Val);

  for j= 1 to NoOfRows('Test2')

  if $(j)=1 then

  let concatinated=FieldValue('UpgradeName_New',$(j));

  ELSE

  let concatinated = '$(concatinated)' & ',' & FieldValue('UpgradeName_New',$(j));

  end If

  next

  DROP Table Test2;

  if($(i)=1) then

  Final:

  LOAD Distinct

  '$(where_Val)' as AD_ID,

  '$(concatinated)' as Upgrade_Name

  Resident

  Test;

  else

  LOAD Distinct

  '$(where_Val)' as AD_ID,

  '$(concatinated)' as Upgrade_Name

  Resident

  Test;

  end if

next

Regards

Harsha

Anonymous
Not applicable
Author

Hi,

thanks for your reply,

I am trying to understand your suggested solution,

as i understand (and please correct me if i am wrong),

the solution is to build a concatenated table based on column "UpgradeName",

but how the user can select a specific upgrades?

for example, a user would like to choose "Basic" upgrade,

it should present:

jobid, upgarde name

1, Basic & SCO Boost & Industry Boost