Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Next Item Data is not loading based on Item

I have table data like the below,

Item_ID    Date        Price

PR01    01-Jan-2014    40

PR01    03-Jan-2014    NULL

PR01    04-Jan-2014    30

PR01    05-Jan-2014    NULL

PR02    01-Jan-2014    NULL

PR02    02-Jan-2014    50

PR02    03-Jan-2014    NULL

PR02    04-Jan-2014    40

And I want the result the data like below,

Item_ID    Date        Price

PR01    01-Jan-2014    40

PR01    03-Jan-2014    40

PR01    04-Jan-2014    30

PR01    05-Jan-2014    30

PR02    01-Jan-2014    50

PR02    02-Jan-2014    50

PR02    03-Jan-2014    40

PR02    04-Jan-2014    40

I tried the some option but it is not working as expected .Please anyone sugggest

If(Len(Trim(Price))=0 and Item_ID=Previous(Item_ID), Peek( Price),Price),

4 Replies
Ralf-Narfeldt
Employee
Employee

Have you tried substituting Len(Trim(Price))=0 with IsNull(Price)?

Not applicable
Author

Ya It is working fine

Ralf-Narfeldt
Employee
Employee

Great! Please mark the question as Answered if you're happy!

Not applicable
Author

Hi Ganesh,

If(Isnum(Price)=0 And Item_ID=Peek('Item_ID',-1), Peek('Price',-1),Price)

should work for you as you are expecting a valid number in your price field.

hope that help
Joe