-
1. Re: How to count number of instances between rows?
swaroop.gantela Aug 3, 2016 6:48 PM (in response to Allen Yoo)Allen,
Please see if the attached could be a starting point for you.
I think the conditional will be as you described, requiring the use of Lookup to get the comparison across rows:
IF ATTR([Expiry Date])=LOOKUP(ATTR([Effective Date]),1)
THEN ATTR([Customer]) + " is transferring from " + ATTR([Item Name]) + " to " + LOOKUP(ATTR([Item Name]),1)
ELSEIF ATTR([Effective Date])=LOOKUP(ATTR([Expiry Date]),1)
THEN ATTR([Customer]) + " is transferring from "+ LOOKUP(ATTR([Item Name]),1) + " to " + ATTR([Item Name])
ELSEIF ATTR([Expiry Date])=LOOKUP(ATTR([Effective Date]),1) THEN "Transfer A to B"
END
I think I may have gone about the counts in too round-about a way:
First I made [SwitchInForCount]:
IF ATTR([Expiry Date])=LOOKUP(ATTR([Effective Date]),1)
THEN "Switch in " + ATTR([Item Name])
ELSEIF ATTR([Effective Date])=LOOKUP(ATTR([Expiry Date]),1)
THEN "Switch in " + LOOKUP(ATTR([Item Name]),1)
END
Then to aggregate and show:
IF FIRST()=0 THEN
WINDOW_COUNT([SwitchInForCount])
END
-
212637switch.twbx 29.7 KB
-