Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

awadah25
Contributor

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

Re: Records in groups

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

3 Replies

Re: Records in groups

Like this for example:

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

Re: Records in groups

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

MindaugasBacius
Valued Contributor II

Re: Records in groups

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.