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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

how to create new feild based on existing

i have a list of agents A1, A2, B1, B2, B3, C2, C3 ,C4 ....

i want to categorise agents A, B and C

(create fiels for A agents, B agents, C)

3 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I don't understand so well, but maybe the attached file could help.

ashfaq_haseeb
Champion III
Champion III

Hi may be like this

Agents_Main:

Load Agents,

  left(Agents,1) as Agent_Groups;

LOAD * INLINE [

    Agents

    A1

    A2

    A3

    B1

    B2

    C1

    C2

    C3

    C4

];

Regards

ASHFAQ

maxgro
MVP
MVP

Load agents,

  // this (3 fields)

  if(left(agents,1)='A',1,0) as agent_a,

  if(left(agents,1)='B',1,0) as agent_b,

  if(left(agents,1)='C',1,0) as agent_c,

  // or this?

  left(agents,1) as agentgroup

  ;

LOAD * INLINE [

    agents

    A1

    A2

    A3

    B1

    B2

    C1

    C2

    C3

    C4

];