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

Get Quarters in Relational Model

Started by priya@90, 16 Feb 2016 11:34:03 AM

Previous topic - Next topic

priya@90

Hi All,

How to get quarters using below 2 data items 1. Month data item is having 2(means Feb and this has been done in ETL) in DB and Year data item is having 2016 and iam concatenating both iam getting 2,2016 and now i want to get quarters in my chart like Q1 2015, Q2,2015...Q42015..upto 8 quarter including current quarter.
iam trying this case statement but it's not working

Case when [concatenate] then 'Q1'
when [concatenate] then 'Q2'
else 'Q3'
end

How to execute to get the correct quarters. Iam using cognos 10.2.2 and Relational MOdel with DB2

Thanks,
Priya

Deep750

Can't you make a case like

Case when [month] in (1; 2; 3)
then 'Q1'||' '|| [year]
when [month] in (4; 5; 6)
then 'Q2'||' '|| [year]
etc etc

?

priya@90

Thanks Deep. It's working as expected

priya@90

How to get count for every quarter like Jan(1)=10, Feb(2)=20, mar(3)=30 so I want to get as quarter1 total q1,206=60

priya@90

done. count(data item) for [dataitem2]. [dataitem2] is above case statement and [data item] is month.

Thanks,
Priya.