Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Thanks,
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'))))
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 ];
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'))))
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
];
Thanks Anand. Nice Explanation.Its Working