Discussion Board for collaboration related to QlikView App Development.
hello frndz,
i have a scenario lyk
Booking ID | Approval Code | Transaction Date | =sum([Collection Amount]) | =sum(ECouponAmount) |
NF2101322199095 | 08-10-2012 | 1634 | 100 | |
NF2101322199095 | 03-11-2012 | 249 | 100 | |
NF2101322199095 | BYPASS | 04-10-2012 | 0 | 100 |
NF2101322199095 | 019233 | 08-10-2012 | 975 | 100 |
here ECoupan is coming 4 times for same id but i want it only once for the first transaction only
i have used expression
if(Peek([Document No_])<>[Document No_],ECouponAmount,'0') as ECouponAmount,
if(previous([Document No_])<>[Document No_],ECouponAmount,'0') as ECouponAmount,
but not giving the desired output, plz help
Hi,
Maybe you should do the Peek with -Booking ID:
e.g :
LOAD
*,
if(Peek([Booking ID])<>[Booking ID],ECouponAmount,'0') as ECouponAmountFinal;
LOAD * INLINE [
Booking ID, Approval Code, Transaction Date, Collection Amount, ECouponAmount
NF2101322199095, , 08/10/2012, 1634, 100
NF2101322199095, , 03/11/2012, 249, 100
NF2101322199095, BYPASS, 04/10/2012, 0, 100
NF2101322199095, 19233, 08/10/2012, 975, 100
];
You may need to relad the table first, with an Order By clause, to make sure it is in the expected order.
Jonathan