Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one field called customer in that have many records , So I want to do grouping on that same records.
Please see below image I have customer name base on customer name i want Customer Grouping field as like below
Ex Output .
Check the Attachment..
I would suggest - Use Pivot table and make Customer grouping as first column then use CustmerName.
Thanks
BKC
As per my understanding, you can create one excel file with you Customer Group Name. And you can create the Field based on your Customer Name using Mapping and ApplyMap Functions..
Like.
T1:
Mapping
LOAD * Inline [
CustomerName, Customer Grouping
ABEX Pharama, ABEX Pharama
ABKarr, Accord
Accord Healthcar Ltd, Accord
Accord SA, Accord
Actavis ABC, Actavis
Actavis US, Actavis
];
LOAD ApplyMap('T1',CustomerName,'Unknown') as CustomerGrouping
Is the field Grouping already in your data set or you need to create it?
If yes what's are the criteria for each of the group?
(especially for the second one? How do we know that Watson = Activis)
Feeling Qlikngry?
I would suggest 2 way to do this:
1) Do the hardcoding at script level sth like:
IF(CustomerName='ABEX Pharama(PTY) Ltd','ABEX Pharama(PTY) Ltd',
IF(CustomerName='ABKARR CORPORATION','ABKARR CORPORATION',
IF(CustomerName='Accord Healthcare Ltd' or CustomerName='Accord Healthcare SA','Accord Healthcare Ltd'
and so on //Rename it as Customer Grouping
2)
Create a Inline Function or Excel Sheet for same like:
load * inline
[Customer ID, CustomerName, CustomerGrouping
111, ABEX Pharama(PTY) Ltd, ABEX Pharama(PTY) Ltd,
112, ABKARR CORPORATION,ABKARR CORPORATION,
and so on
];
Then link this Inline table or excel file with ID in data model!!
Hope this help!
create the Grouping in the script as below
=if(wildmatch(lower(CustomerName),'accord*'),'Accord Healthcare Ltd',
if(wildmatch(lower(CustomerName),'actavis*') or wildmatch(lower(CustomerName),'watson*'),'Actavis Pharma Company',
if(wildmatch(lower(CustomerName),'almus*') ,'Almus Farmaceutica, S.A',CustomerName))) as Customer_Grouping
Hi Robert,
I have one excel in that i got grouping field called CustomerGrouping. and I want to link these with customer table.
PFA....
Check the Attachment..
I think you have not provided correct field name for linking
Rename Customer_Names to Customer_Name
Hi Settu,
Thanks for your help,
Can you please explain me this
(ooxml, embedded labels, table is final, filters(Replace(4, top, StrCnd(null))));
Thanks