Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Using concat in a set expression to seperate selections from a list

Hi,

I am trying to set up a series of tables, each table is based on a function that is in a list.

So the first selection in the field list selection will be table 1

and the second selection in the list is table 2, etc

I can see concat work when I set it up as a caption, but when I put it in an expression formula it wont work.

How can I get this to work is concat correctly used?

Thanks,

 

=

count(distinct{<[Business Function]={'=subfield(concat(distinct [Issue - Business Function],','),',',1)'},[Status]=p([Dependency Analysis]::[Issue - Status])>}[Issue - ID])

4 Replies
Anonymous
Not applicable

What is the Content of Business Function?

If it is like

Support

Marketing

Sales

etc.

your concat will result in "Support, Sales" etc. So there will no hit

When you select only 1 Business Function it should work, can you confirm?

tinkerz1
Creator II
Creator II
Author

Yes its just a list of business area's


As I wrap the concat function within a subfield and use an index of 1, that will pass the first item in the list back.

So in your list it will be support.

It wont work when i select only one, but the caption works:

=

subfield(concat(distinct [Business Function],','),',',1)

so why wont this work in the set analysis?

tinkerz1
Creator II
Creator II
Author

  this works, but I dont understand why the '' is used to qualify the dollar expansion?

{'$(=subfield(concat(distinct [Issue - Business Function],','),',',1))'}

tresesco
MVP
MVP

'' would not be required unless there is a space between your resultant string, i.e. if your first [Business Function] is like 'XXXXYYY' and not like 'XXX  YY'.