Running total of hours for ID at detail level - TmemorizeRows nogood
I have a detail transaction table that includes work hours for each work type. This detail is extracted into a new table with almost same info with new columns where total work hours for each work type are aggregated for that employee group. I need this detailed transaction record display the total work hours he does & total work hours recommended for that work type for comparison - BUT the total here is a running total of hours. Sample data posted -
NEW COLUMNS NEEDED HERE ARE : SUM_WORKED HOURS & SUM_RECOMMENDED HOURS - These are running totals for different clients that get added by all previous hours for that client. When client changes, the next records reset and new totals begin (BANK1, BANK2)
I have tried tMemorizeRows but it needs a row number defined to memorize specific number of rows (just comparing current and and a defined set of memorized rows works fine but data needed here has no preset number of rows per client and worktype, hence I am stuck. Help please
Thanks Deejay but that doesn't apply in my case. I figured it out based on forum notes
source DB --> tsort desc (Bank;employee,worktype) ---> tmap (source fields plus retrieve globalmapped variable a) --> tjavarow(derive cumulated value = current record value + global variable a; then map into global variable a based on new Bank,employee,worktype condition)--> output table
Understand tjavarow was tricky as I am not a Java guy but learning java a little bit helped in syntax.
Shong's article on one of the forums was very helpful.
Thanks