Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

 

 

 

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 - Creator III
Partner - Creator III

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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), ',')
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), ',')