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: 
Karthick30
Creator
Creator

Concat Function

Hi,

 I have a Dataset like below. I am creating one new column by using Concat function. its for combination of code column.

New Column : aggr(Concat(Code, ','),Plant)

Karthick30_0-1658999697929.png

I am getting correct Output. But for A113. I am having blank in input. so output coming as ,LXGH. Is there any way to remove , (comma) in the string.

Karthick30_1-1658999904716.png

 

 

Labels (3)
2 Solutions

Accepted Solutions
edwin
Master II
Master II

try this in your table, its looking only for code len > 0

 

edwin_0-1659010166259.png

 

View solution in original post

sidhiq91
Specialist II
Specialist II

@Karthick30 Could you please try the below expression. I will attach the output as well.

=if(left(Aggr(Concat(Code,','),Plant),1)=',',mid(Aggr(Concat(Code,','),Plant),2,Len(Aggr(Concat(Code,','),Plant))),
Aggr(Concat(Code,','),Plant))

If this resolves your issue, please like and accept it as a solution.

View solution in original post

3 Replies
edwin
Master II
Master II

try this in your table, its looking only for code len > 0

 

edwin_0-1659010166259.png

 

edwin
Master II
Master II

is one shows what it looks like the way you did it without the set analysis  phrase

edwin_1-1659010241660.png

 

sidhiq91
Specialist II
Specialist II

@Karthick30 Could you please try the below expression. I will attach the output as well.

=if(left(Aggr(Concat(Code,','),Plant),1)=',',mid(Aggr(Concat(Code,','),Plant),2,Len(Aggr(Concat(Code,','),Plant))),
Aggr(Concat(Code,','),Plant))

If this resolves your issue, please like and accept it as a solution.