cognos - Use summary data in row calulations on a report? -
i using cognos report studio 8.4.1.
i have list report want use query calculation create new column of data, calculation needs 2 numbers summary (subtotal) of data want calculation for. possible? if so, how do it?
sample data:
id # project # reg ot bonus 2716 20130405 41.6 1.6 2716 20130412 38.9 0.0 2716 20130419 52.3 12.3 2716 20130426 47.0 7.0 2716 b03-1304 $23.17 2716 b15-1304 $1.51 - - - - - - - - - - - - - - - - - - - - - 2716 4 $24.68 ------------------------------------------ 2717 20130405 39.9 0.0 2717 20130412 40.2 0.2 (etc) the query calculation want create each line be:
[total(bonus)] / [count(reg)] / (reg) / 2 * (ot) (this not work)
so in above example, result first row of data be:
24.68 / 4 / 41.6 / 2 * 1.6 = 0.12 (rounded)
is there any way can this, or equivalent?
completely re-writing report or creating new report fine. if answer complex (or uses sql), please detailed; i'm novice user , entirely self-taught, there large number of gaps in knowledge of cognos.
you need use cognos summary functions
report studio summaries
or more detailed explanation in here:
using @ , options relational summary functions
question, think should this:
total([bonus] [id])/count([reg] [id])/[reg]/2*[ot] <br> if reason, not give expected results, try break expression smaller expressions (like total([bonus] [id])) , see if gives expected results.
Comments
Post a Comment