Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community
I have one Question on Rowno()
It is very easy to do calculations based on first Row by using If(Rowno()=1,Your expression)
Suppose if i want last row, what i would write in Expresssion:
if(Rowno()=?,Your expression)
What to write in Place of ?
Regards
Aviral
Nag,
i think, you may for example:
a) load your table with additional field = rowno()
next you may load the same table resident but order your data by this additional field descending.
in 2'nd step your last row will be first
I think maybe:
If(Rowno()=NoOfRows(),Your expression)
Hope this helps!
U should use peek in this case.
lets say u have loaded the table as table1 and rowno() as rownumber.
use peek like
let variable1=peek('rownumber',-1,'table1');
now use a resident and use the variable1...
-1 denotes last row in the table(property of (peek)
0 represents 1sr row, 1 represents second.....
Hope this helps.
-Sundar
Can you help me in the Attached Qvw.
Any Help would be Appreciated.
Regards
Aviral
Not sure what kind of sorting you are doing in your original table. Can you explain your logic of how you want to calculate your numbers? what kind of output are you looking for?
I can give you this:
=if(rowno()=NoOfRows(),Count(DISTINCT if(TrnType='MOB',CommonEmpCode)),below([Opening MOB]))
but it does not replicate the values in your original table, since they aren't in the reverse order. To figure out what formula you need, you need to figure out what kind of sorting you have in the table. Not sure if you'll be able to use above, below, rowno(). You might have to do something in the script.
Hope this helps!
I want this:
If thats the case, then the formula I gave you should work:
=if(rowno()=NoOfRows(),Count(DISTINCT if(TrnType='MOB',CommonEmpCode)),below([Opening MOB]))
Please find attached.