If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

xtab report

Started by sspk, 19 Jun 2008 10:39:06 AM

Previous topic - Next topic

sspk

Hi All,
I have a cross tab report in which the rows have data items like division and molecule and in the columns i have year and qtr and measures are dollars and Qty.And now i want to display some thing like previous year full total(not qtr wise) and current year in  qtr's.
I did like discontinuous xtab like dropping the qtr at the end .But it is displaying the qtr's of the previous year itself.Any ideas will help me alot  :-\

blom0344

Use a union on 2 seperate queries:

1. Select [Rowitem1],[Rowitem2],[quarter], sum[quantity] from table where year = 2008
group by [Rowitem1],[Rowitem2],[quarter]


2. Select [Rowitem1],[Rowitem2],'Last year' ,sum[quantity] from table where year = 2007
group by [Rowitem1],[Rowitem2],'Last year'

(Assuming that [quarter] is a string value)

Now you should only use the query item that is associated with the quarter as a column.


sspk

Quote from: blom0344 on 19 Jun 2008 02:15:14 PM
Use a union on 2 seperate queries:

1. Select [Rowitem1],[Rowitem2],[quarter], sum[quantity] from table where year = 2008
group by [Rowitem1],[Rowitem2],[quarter]


2. Select [Rowitem1],[Rowitem2],'Last year' ,sum[quantity] from table where year = 2007
group by [Rowitem1],[Rowitem2],'Last year'

(Assuming that [quarter] is a string value)

Now you should only use the query item that is associated with the quarter as a column.


Thanks for the response, it  helped me alot

sspk

Quote from: scognos07 on 24 Jun 2008 11:49:08 AM
Thanks for the response, it  helped me alot


HI,
I have to add a calculated query item (% gross=total([dollars]/total([dollars] for [division]) ) .But this is giving correct values for year wise query .But i am un able to get % gross for qtr wise query.
Any ideas will help me.