Discussion board where members can get started with Qlik Sense.
I have a load statement:
Load * Inline [
I want output:
This should happen for every next value added in inline.
Can anyone suggest a solution for this. I tried using left() and keepchar() but my logic is not working out.
Go to Solution.
Try this it is working fine.
Load * ,len(temp) as length Inline [
Load temp, length as length1
where length >1;
//let vRowCount= peek('RowCount',-1,'new1') ;
//for i=0 to $(vRowCount)
let vlength= peek('length1',-1,'new1');
do while vlength>0
Load mid(temp,$(vlength),1) as nee
new where length=1;
Load nee as temp
Order by nee ;
Drop Tables new,new1,P;
Did you try with mid() function?
yes, i tried that. but the main problem is that the rest of the value is not coming in next line.
This works perfectly:
,Len(temp) as Lenght
,RowNo() as Row
DROP Table Temp;
LET TotalRow = Peek('Row', -1, 'tmp');
FOR i = 1 to $(TotalRow)
Where Row = $(i)
vLenght = Peek('Lenght');
vTemp = Peek('temp');
LOAD Mid('$(vTemp)', '$(vLenght)', 1) as NewTemp
,'$(vTemp)' as Temp
,'$(vLenght)' as Lenght
DROP Table tmp2;
DROP Table tmp;
Is there any seprater in actual value then you can use subfield or else
left and right function.
no there is no separator in the values so can't use subfield.
Using left and right just gives me single value, i want the rest of the string evaluated as per the logic in next line.
this is not actually working out . if i add new value as 'def' in Temp column . you can see the below output:
Try this code
Order by nee;
But in some filed have 2 characters then its not work..