Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhas277
Creator
Creator

expression

HI ,

I have 2 fields 1 is id, value

those  2 fields are having values are like below

ID, Value

1, a/b/c/d

BUt i want o/p like below

ID, value

1,a

2,b

3,c

4,d

How i can get the value?

Thanks in advance.


8 Replies
vinieme12
Champion III
Champion III

are you guys from the same team??

the same query has been posted here

AUTOGENERATE

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Data:

Load * inline [

ID, Value

1, a/b/c/d

];

Temp:

Load ID as ID1 , SubField(Value,'/') as Value Resident Data;

Drop table Data;

Final:

Load If(isnull(Previous(ID1)),ID1,(Peek(ID)+1)) as ID, Value Resident Temp;

Drop table Temp;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

Another options

Table:

LOAD RowNo() as ID,

  SubField(Value, '/') as Value;

Load * inline [

ID, Value

1, a/b/c/d

];

sunny_talwar

It could very well be an interview question

vinieme12
Champion III
Champion III

Lol

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

I am serious... I have seen people posting there interview question on the community....

vinieme12
Champion III
Champion III

And question has been asked third time today, I think everyone is appearing for the same job

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

So if it is the third time... I am 99% sure it is for one of the interview.... But I guess if everyone answers it in the same way... it kind of defeats the purpose... How do you you choose? lol