Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
PARK_JY
Contributor III
Contributor III

wildmatch or subfiled

hello,

model weight
a-1 1
a 5
a-2 4
b 3
b-1 3
b-2 2

 

I want to convert the above to below using wildmatch or subfiled function.

model weight
a 1
a 5
a 4
b 3
b 3
b 2

 

Please help me. thank you.

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

HI

Try like below

Load SubField(model,'-',1) as model, weight Inline
[
model weight
a-1 1
a 5
a-2 4
b 3
b-1 3
b-2 2
](delimiter is ' ');

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan
MVP
MVP

HI

Try like below

Load SubField(model,'-',1) as model, weight Inline
[
model weight
a-1 1
a 5
a-2 4
b 3
b-1 3
b-2 2
](delimiter is ' ');

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
sidhiq91
Specialist II
Specialist II

@PARK_JY  Please use the below code:

NoConcatenate
Temp:
Load SubField(model,'-',1) as model,
weight

inline [
model, weight
a-1, 1
a, 5
a-2, 4
b, 3
b-1, 3
b-2, 2
];

Exit Script;

Please like and accept it as a solution if it resolves your issue.