Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
srujanaponnuru
Creator
Creator

straight table

Hi,

i have a source like this in excel.

 

Manager names
Carry, Jim
Pitt, Brad
Watson, James

Rao, Subba

i need a straight table in qlikview like the below as shown:

  

Primary Jim
Secondary

Carry

please suggest how to do.

17 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

If the question is how to split the names, then something like:

     =SubField([Manager Name], ',', 1)   // first name/Primary

     =SubField([Manager Name], ',', 2)   // second name

     or

      =Trim(SubField([Manager Name], ',', 2))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
srujanaponnuru
Creator
Creator
Author

actually my source was like this..sorry for the inconvenience caused.

Manager Names

Carry, Jim

Pinto, Noel

Pitt, Brad

Carry, Jim

Watson, James

Pinto, Noel

i need an output like this in qlikview

PrimaryJim Carry
SecondaryNoel Pinto

please hlep

srujanaponnuru
Creator
Creator
Author

actually my source was like this..sorry for the inconvenience caused.

Manager Names

Carry, Jim

Pinto, Noel

Pitt, Brad

Carry, Jim

Watson, James

Pinto, Noel

i need an output like this in qlikview

Primary nameJim Carry
Secondary nameNoel Pinto

please help

Anil_Babu_Samineni

Can you please share the Excel

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
leni_harishwara
Partner - Contributor III
Partner - Contributor III

Hi,

Please try with the below code,

Tbl:

LOAD ManagerName,

  SubField(ManagerName,';',1) as Primary,

  SubField(ManagerName,';',2) as Secondary;

LOAD Replace(ManagerName,chr(10),';') as ManagerName

FROM

TestData.xlsx

(ooxml, embedded labels, table is Sheet1);

Assumed, the space between values in the same cell as "enter key value" and provided the code.

Replace(ManagerName,chr(10),';')  - This will replace the "enter key" which chr(10) with ";" so the data will get modified to "Carry, Jim;Pinto, Noel" and using Subfield we can take the Primary and Secondary values as in screenshot below,

screenshot.PNG

Regards,

Leni

HirisH_V7
Master
Master

Hi,

Is this what you're looking for,

Splitting Field in straight table-237640.PNG

By using this below script,Check this,

Temp:

LOAD *,

If(Right(RowNo()/2,2)<>'.5',[Manager Names] &':' & Peek([Manager Names])) as New

INLINE [

    Manager Names

    "Carry, Jim"

    "Pinto, Noel"

    "Pitt, Brad"

    "Carry, Jim"

    "Watson, James"

    "Pinto, Noel"

];

Data:

Load RowNo() as ID,

     SubField(SubField(New,':',2),',',2)&' '&SubField(SubField(New,':',2),',',1) as Primary_Name,

    SubField(SubField(New,':',1),',',2)&' '&SubField(SubField(New,':',1),',',1) as Secondary_Name

   

Resident Temp Where New<>Null();

Drop Table Temp;

Hope this Helps,


else Can u please elaborate your'e requirement, with providing much more info.

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
maniram23
Creator II
Creator II

Hi,

This is helpful for you.

please check it.

srujanaponnuru
Creator
Creator
Author

thank you harish, this ight help. But only one thing is i dont need id numbers in the table. i just need primary name and secondary name. but inline wil not help for me as i have huge rows of data.

please suggest.

susovan
Partner - Specialist
Partner - Specialist

Hi Srujana

Try this,

=Replace([Manager names],',',' ')

Warm Regards,
Susovan