Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
You have to use Order By like:
Load*,If((QTY)=0,Peek('Test'),QTY) As Test
Resident Tab Order By Filter, ID;
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
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
Why not if you write like below try what result you get.
Load
*,
If( QTY = 0,QTY ) As Test
Resident Tab;
DROP Table Tab;
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
Tried it
If the value is 0 it showing me 0
and
If there is a value it showing me -
You have to use Order By like:
Load*,If((QTY)=0,Peek('Test'),QTY) As Test
Resident Tab Order By Filter, ID;
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))
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.
Not necessarily.