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: 
Not applicable

pick & wildmatch

Hello,

I was wondering if you can help me to fix the following code:

,pick(wildmatch([Transaction Type],'A', 'B' , 'C')+1,[Transaction Type],'A1', 'B1', 'C1') as [Transaction Type.t]

;

How to change the code so A & B would be together under A1 ?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You didn't say how you want to group them, so I assume:  A & B to A1, C & D to B1, E & F to C1

(and, I removed the unnecessary parts)

,pick(wildmatch([Transaction Type],'A', 'B' , 'C,'D', 'E' , 'F'), 'A1','A1','B1','B1', 'C1','C1') as [Transaction Type.t]

View solution in original post

5 Replies
Anonymous
Not applicable
Author

,pick(wildmatch([Transaction Type],'A', 'B' , 'C')+1,[Transaction Type],'A1', 'A1', 'C1') as [Transaction Type.t]

sunny_talwar

What do you mean when you say A & B would be together under A1? Can you elaborate a little more.

Best,

Sunny

Not applicable
Author

I think it solves the problem.

so if i have A, B, C, D,E, F as transactions and want them to be in 3 groups - A1, A2, A3 - how would you solve that? (AB) (CD)(EF)

how to set up the underlined part?

,pick(wildmatch([Transaction Type],'A', 'B' , 'C,'D', 'E' , 'F')+1,[Transaction Type],'A1', 'B1', 'C1') as [Transaction Type.t]

Anonymous
Not applicable
Author

You didn't say how you want to group them, so I assume:  A & B to A1, C & D to B1, E & F to C1

(and, I removed the unnecessary parts)

,pick(wildmatch([Transaction Type],'A', 'B' , 'C,'D', 'E' , 'F'), 'A1','A1','B1','B1', 'C1','C1') as [Transaction Type.t]

Not applicable
Author

Thank you.  yes.  I edited my response but you guessed correctly and I see the logic and how it flows now and will be able to solve my problem.  Thank you.