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: 
wanass123
Contributor III
Contributor III

select multiple in if statement - please help

Dears , I have below table  , customer can have multiple services , what I need is to create new column with what customer has please check below tables to understand  : 

 

current data :  

Customer Number Type 
1 Mobile 
1 Data 
2 Mobile 
3 Mobile 
4 Data 
5 Mobile 
5 Data 

 

expected result : 

Customer Number Product Summary 
1 Mobile & Data
2 Mobile
3 Mobile
4 Data
5 Mobile & data

 

Labels (4)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If in chart:

Dimension:  [Customer Number]

Measure: Concat(type, ' & ')

If in script:

LOAD
  [Customer Number]
  Concat(type, ' & ') as [Product Summary]
  Resident yourtable
  Group By [Customer Number];

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If in chart:

Dimension:  [Customer Number]

Measure: Concat(type, ' & ')

If in script:

LOAD
  [Customer Number]
  Concat(type, ' & ') as [Product Summary]
  Resident yourtable
  Group By [Customer Number];

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

 

wanass123
Contributor III
Contributor III
Author

Thank you very much , I'm using script , and this is a prefect solution  ,just one question please the result give some times for some records duplicated data  which is also correct as data  but just to give a good look how to remove the duplicate example   :   

Customer Number Product Summary 
1 Mobile & Data & Mobile & Data & Data 
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Concat(DISTINCT type, ' & ') as [Product Summary]

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com