Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to show each year as column in list report

Status
Not open for further replies.

asini

Technical User
Nov 13, 2008
22
US
Hello All,


in my list report (in cognos 8.3)
i am having

remcount
AmountRemit

above both are measures

now i am having weighted average as (it is a insertable object)WeightAVG= total ([AmountRemit]*[remcount])/total([remcount])

i have year objects as 2008 and 2009 and 2010

in each year i am having below math

if ([remYear] = 2008) THEN ([WeightAVG]) else (null))

it gave me only one value (either 2008 or 2009 or 2010 value)

so i did as below

total (if ([remYear] = 2008) THEN ([WeightAVG]) else (null)))
it gave me irrelevent results

so how can i acheive it

please help me

thanks
asitta

 
Try adding a context like:

Code:
 total (([AmountRemit]*[remcount] for [remYear)/total([remcount] for remYear)

for your [WeightAVG] item

Ties Blom

 
Hi blom,

really appreciate your immediate response,

here i tried as you suggested but it shows irrelevenat and very larger values in the output year columns

i did as,

here i forgot to tell you one thisn year attribute is a datamember (created & calculated in report) as

RemYear ==--> substring(cast_char([AssumptDate]),8,4)
and both aggregate & rollupaggregate is automatic

then i created weighted avg as you suggested

total (([AmountRemit]*[remcount] for [remYear)/total([remcount] for remYear)


then year2009 and year 2010 field as

if ([remYear] = 2008) THEN ([WeightAVG]) else (null))

even i tried to include

total (if ([remYear] = 2008) THEN ([WeightAVG]) else (null)))

but no use

i tried to change aggregate & rollup aggregate to different ways

could you please help me

i am not mean to hurry u , but i am in really bit tough situation

please..


thanks
asitta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top