Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
shruthibk
Creator
Creator

nested concat on pivot table

Hi All,

I have a requirement to concat two fields to show in a pivot table.

Week, Category, title

1,beauty,Test1

1,beauty,Test2

1,Espresso,Test2

 

expected output

week  1

 test1,test2(beauty),Test2(espresso)

Kindly help me with the concat function 

 

Thanks,

Shruthi B K

 

 

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

You can try this

=Concat(DISTINCT Aggr(Concat(DISTINCT title, ',') & '(' & Category & ')', Week, Category), ',')

View solution in original post

9 Replies
jaibau1993
Partner
Partner

Hi!

Use something like the following as expression:

Concat(Distinct title & '(' & Category & ')')

Regards,

Jaime. 

shruthibk
Creator
Creator
Author

the expression doesn't return the desired output

shruthibk
Creator
Creator
Author

the suggested expression is giving the output

 test1(beauty),test2(beauty),Test2(espresso)

 

but expected output is 

test1,test2(beauty),Test2(espresso)

 

Anil_Babu_Samineni

What is the O/P you need from below table?

Week, Category, title

1,beauty,Test1

1,Espresso,Test2

1,beauty,Test1

1,Espresso1,Test2

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
shruthibk
Creator
Creator
Author

for week 1

Test1(beauty),Test2(Espresso,Espresso1)

sunny_talwar

You can try this

=Concat(DISTINCT Aggr(Concat(DISTINCT title, ',') & '(' & Category & ')', Week, Category), ',')

View solution in original post

shruthibk
Creator
Creator
Author

Thank you Sunny 🙂

sunny_talwar

But this doesn't seem to work with the solution you provided to @Anil_Babu_Samineni updated sample.

bixpahalley
Contributor II
Contributor II

you can try this, it's work.

=Concat(DISTINCT Aggr(Concat(DISTINCT title, ',') & '(' & Concat(DISTINCT Category,',') & ')', Week, Category), ',')