Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter not working

 

Let vPre=Peek('QTY',0,'Tab');

Load*,If((QTY)=0,Peek('Test'),QTY) As Test

Resident Tab;

DROP

Table Tab;

I have used this condition to get the previous data  when the value is null but if i use any filter it is showing the same value and its not showing as per the filter

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You have to use Order By like:

Load*,If((QTY)=0,Peek('Test'),QTY) As Test


Resident Tab Order By Filter, ID;

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Hi,

You may use below expression. It should be straight forward instead of creating variable and all.

If(QTY=0, Previous(QTY), QTY) as Test

Not applicable
Author

by selecting the filter JONES ID 20 KKR is showing 844 but actually JONES previous data is 45 i.e ID 13 HDJH so how to get this condition

its_anandrjs

Why not if you write like below try what result you get.

Load

*,

If( QTY = 0,QTY ) As Test

Resident Tab;

DROP Table Tab;

Not applicable
Author

previous(QTY) will only shows the previous value but if there are continous Null value then it displays Null value itself this condition is not what i needed

Not applicable
Author

Tried it

If the value is 0 it showing me 0

and

If there is a value it showing me -

tresesco
MVP
MVP

You have to use Order By like:

Load*,If((QTY)=0,Peek('Test'),QTY) As Test


Resident Tab Order By Filter, ID;

Anonymous
Not applicable
Author

Hi,

If you want your previous data to be displayed based on your selection than you have to handle this in frontend script not in backend. For example, you can use "Above()" function in straight table to achieve this.

If(Above(QTY)=0, Above(QTY,2), Above(QTY))

its_anandrjs

If you use Order By you have to use all the fields available in the Tab table that you introduce in resident table for group by statements.

tresesco
MVP
MVP

Not necessarily.