Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Records in groups

if I have a lot of  account # like this..

000-1000-000

000-1001-000

000-1002-000

000-1003-000

000-2000-000

000-2001-000

000-2002-000

000-2003-000

000-3001-000

000-3101-000

000-3201-000 …

And I need to put them in 4 categories.

If Account # start with ‘000-1’ then ‘payable’

If Account # start with ‘000-2’ then ‘Receivable’

If Account # start with ‘000-3’ then ‘Test’

If Account # start with ‘000-4’ then ‘Test02’

thanks

1 Solution

Accepted Solutions
Kushal_Chawda

pick(wildmatch([Account #],'000-1*','000-2*','000-3*','000-4*'),'Payable','Receivable','Test','Test02'))

View solution in original post

3 Replies
Gysbert_Wassenaar

Like this for example:

pick(match(left([Account #],5),'000-1','000-2','000-3','000-4'),'Payable','Receivable','Test','Test02')


talk is cheap, supply exceeds demand
Kushal_Chawda

pick(wildmatch([Account #],'000-1*','000-2*','000-3*','000-4*'),'Payable','Receivable','Test','Test02'))

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

map_desc:

mapping LOAD * INLINE [

    F1, F2

    000-1, payable

    000-2, receivable

    000-3, test

    000-4, test2

];

Data:

Load *

  ,ApplyMap('map_desc', left(Account, 5), ':') as [Account description]

From source;

I would use Applymap in this case.