Discussion Board for collaboration related to QlikView App Development.
For selected date if the values is not available then get previous nearest date value.
How to achieve this?
You can get that using peek() in the script. Have a look here: Generating Missing Data In QlikView
Use of Previous/Peek function you can replace the Null Data with previous one.
If you share your sample file or apps, we can help you in better way.
well the requirement is i need to show balance or that particular day.if there is no balance available the i should consider previous day balance.
Say apr 14 we have balance ,apr 15 we have,ap 18 we have
so now apr 16 and 17 should have 15 data(balance)
balance needs to be carried forwad.
Sample Script enclosed...
LOAD Item, Date, IF(Len(Trim(Balance))=0,Null(),Balance) as Balance Inline
Item, Date, Balance
A, 01/10/2010, 100
A, 02/10/2010, 10
B, 24/10/2010, 150
B, 26/10/2010, 80
If(IsNull(Item),Peek(Item),Item) as Item,
If(IsNull(Balance), Peek(Balance), Balance) as Balance
Order By Date;
Drop Table TempTable;
A little modification needed in Manish's script
If(IsNull(Balance),If(Item=Peek(Item),Peek(Balance),0), Balance) as Balance
Else if the first row of customer B has no Balance value, it will take the previous balance value which is for A, so it will go wrong.