Discussion Board for collaboration on QlikView Scripting.
Words Length from string:
How we get the length of word from the string.i.e
i have string as below,
> this is a car.
so i am expecting the result as 4 2 1 3
thanks in Advanced .
Go to Solution.
Maybe something along this (INLINE table is only for demonstration, use your table source instead):
LOAD string, CONCAT(numChar,' ',index) as numChars
GROUP BY string;
LOAD *, LEN(word) as numChar;
LOAD *, SUBFIELD(string,' ',iterno()) as word, iterno() as index
this is a car
WHILE iterno() <= SUBSTRINGCOUNT(string, ' ')+1;
and if you want a chart expression:
=$(=concat( 'Len(Subfield(''this is a car'','' '',' & ValueLoop(1, SubStringCount('this is a car',' ')+1) & '))' , ' & '' '' & '))
can we use it as variable for column in qlikview ui.