Qlik Sense is a BI tool in which I need to fill the blank values with a value from above
(image from this related thread)
The solution in Qlik View is the following by this thread but in Qlik Sense, it only fills one value below the above value.
if(len(trim("Date"))=0, peek("Date"), "Date") as Date1,
if("Date"= ' ' or "Date"= '' or isnull ("Date"), Previous("Date"),"Date") as Date11,
So how can I fill the blanks with the Dates 01.01.2013
for values 45, 213 and 688; and 02.01.2013
for 3232, 578 and 64421.
Small working example that does not work
Dataaaaa:
Load
if( len( trim([Date 1]) ) = 0, peek([Date 1]), [Date 1]) as Datee,
if( len( trim(Dat) ) = 0, peek(Dat), Dat) as DateII
;
Load * Inline [
Date 1 , Dat , Value11, Value22,
'Hello' , 'ha' , 20 , 30
'' , , 45 , 321,
'' , , 213 , 23
'' , , 678 , 798
'No Word' , 'he' , 123 , 123
'' , , 3232 , 3232
'' , , 578 , 953
'' , , 64421 , 7655
];
After running the script below both fields
Date
andDate1
will be filled.Date1
is just an example how this can be achieved in a new field.Btw QlikView v12 and Qlik Sense have the same engine in the background so there shouldn't be any difference where the script is running.
Result: