Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Annie_Jo
Contributor
Contributor

Group rows with a substring in the column

Hi,

I m need to group rows in a file,I m struggling on how to achive this

Input data

A12,1,2,3,4

A23,1,2,3,4​

B12,1,2,3

B23,12,3​

C12,1,2

​C23,1,2

C23,1,3​

D23,1,2

out should be like

A12,1,2,3,4

B12,1,2,3

C12,1,2

END

​A23,1,2,3,4

B23,1,2,3​

C23,1,2

C23,1,3

D23,1,2​

END​

input might countain mutiple records starts with A,B,C,D​ but the substring after alphabet in the first column sould be same ,those rows need

to groups together.and all these ABCD have different schemas.

Labels (7)
1 Reply
gjeremy1617088143

HI you can extract with a regular expression like "(?<=[A-Z])\\d*" the number just after the letter and then you can use it to group your rows.

Send me Love and Kudos