Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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))
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 | Jim Carry |
---|---|
Secondary | Noel Pinto |
please hlep
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 name | Jim Carry |
---|---|
Secondary name | Noel Pinto |
please help
Can you please share the Excel
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,
Regards,
Leni
Hi,
Is this what you're looking for,
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
Hi,
This is helpful for you.
please check it.
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.
Hi Srujana
Try this,
=Replace([Manager names],',',' ')