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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Create Field by grouping records

Hi Every One,

I have one Field named Maintenance contains 8 records attached below.

From this field by grouping some records I need to create one more field called Maintenance Group Field contains 4 Records like below.

Please suggest is their any way to create like Maintenance Group Field from Maintenance field.

New Field.png

Thanks,

Labels (1)
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

On load script try this

LOAD *,

if(Match(Maintenance,'FS'),'FS',

if(Match(Maintenance,'COM'),'COM',

if(Match(Maintenance,'MI','MI-L'),'MI(MI,MI-L)',

if(Match(Maintenance,'ISC','DENTRAL','KG','KB'),'OTHER')))) as MaintenanceGroup;

LOAD * INLINE [

Maintenance

FS

COM

MI

MI-L

ISC

DENTRAL

KG

KB

];


and you can directly try the calculated dimension in any chart


=if(Match(Maintenance,'FS'),'FS',

if(Match(Maintenance,'COM'),'COM',

if(Match(Maintenance,'MI','MI-L'),'MI(MI,MI-L)',

if(Match(Maintenance,'ISC','DENTRAL','KG','KB'),'OTHER'))))


View solution in original post

4 Replies
its_anandrjs
Champion III
Champion III

Create another field in the table load

LOAD *,

if(Match(Names,'FS'),'FS',

if(Match(Names,'COM'),'COM',

if(Match(Names,'MI','MI-L'),'MI(MI,MI-L)',

if(Match(Names,'ISC','DENTRAL','KG','KB'),'OTHER')))) as Bucket;

LOAD * INLINE [

Names

FS

COM

MI

MI-L

ISC

DENTRAL

KG

KB ];



its_anandrjs
Champion III
Champion III

On load script try this

LOAD *,

if(Match(Maintenance,'FS'),'FS',

if(Match(Maintenance,'COM'),'COM',

if(Match(Maintenance,'MI','MI-L'),'MI(MI,MI-L)',

if(Match(Maintenance,'ISC','DENTRAL','KG','KB'),'OTHER')))) as MaintenanceGroup;

LOAD * INLINE [

Maintenance

FS

COM

MI

MI-L

ISC

DENTRAL

KG

KB

];


and you can directly try the calculated dimension in any chart


=if(Match(Maintenance,'FS'),'FS',

if(Match(Maintenance,'COM'),'COM',

if(Match(Maintenance,'MI','MI-L'),'MI(MI,MI-L)',

if(Match(Maintenance,'ISC','DENTRAL','KG','KB'),'OTHER'))))


maxgro
MVP
MVP

pick wildmatch

load

*,

pick(WildMatch([Maintenance Field],

    'FS', 'COM', 'MI',     'MI-L',  '*'),

    'FS', 'COM', 'MI',    'MI',      'Other') as [Maintenance Group Field]

;

load * Inline [

Maintenance Field

FS

COM

MI

MI-L

ISC

CENTRAL

KG

KB

];

bhavvibudagam
Creator II
Creator II
Author

Thanks Anand. Nice Explanation.Its Working