Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
How to check previous record with the help of for loop
Regards
Ashish
Hello,
previous(FieldName)
or
peek(FieldName)
Hi Ashish,
Using for loops in qlikview is like using for loop in any other programming language. here you nee to use variables as flags. that is if you want to write a for loop, first you have to set a vriable to your count. I have given a small illlustration on how to use for loops in QlikView. this is a small code to show how its syntax comes.
let y=noofrows('tab1');
for i=1 to $(y)
a=mid(fieldvalue(cond.,xxx,yyy);
next i;
Hope this helps you.
Thanks Joseph........
thanks Thopz helping me
my problem is
i have one table
table contain trip id booking date tripname tripamount totalfare bookingcalss flight# departuredate farebasic
i have give discount those how book ticket late but paid less amount in compare previous book ticket
just take example
case 1 ) trip id 1004012867 book the ticket 4/1/2010 01:40:04 . PM and paid total fair 4918.44
case 2) trip id 1004158104 book the ticket 4/15/2010 11:53:31 . PM and paid total fair 4912.44
case 3) trip id 1004158104 book the ticket 4/15/2010 11:53:31 . PM and paid total fair 4885.44
then i give discount on case 1 and case 2
case 1) get discount 4918.44 - 4885.44 =33
case 2) get discount 4912.44 - 4885.44 =27
how can we do please help me
Trip ID | Booking Date/Time | Trip Nmae | Trip Amount | Total Fare | Booking Class | Flight # | Segment Departure Date Time | Fare Basis | |
1004012867 | 4/1/2010 01:40:04 . PM | Kathmandu - New Delhi one-way | 4918.44 | 4918.44 | O | 502 | 5/1/2010 02:40:00 . PM | [OSFOWNP] | |
1004126398 | 4/12/2010 07:16:42 . PM | Kathmandu - New Delhi one-way | 9824.88 | 4912.44 | O | 502 | 5/1/2010 02:40:00 . PM | [OSFOWNP] | |
1004158104 | 4/15/2010 11:53:31 . PM | Kathmandu - New Delhi one-way | 33636.22 | 4885.44 | O | 502 | 5/1/2010 02:40:00 . PM | [OSFOWNP] | |
1004238319 | 4/23/2010 10:26:49 . PM | Kathmandu - New Delhi one-way | 5132.17 | 5132.17 | O | 502 | 5/1/2010 02:40:00 . PM | [OSFOWNP] |
hi
I am waiting for your help
Regards
Ashish