Create 12 columns for months by writing single case statement?
Answer Posted / naresh
To create 12 columns for months by single case statement :-
Step-1: Create one derived column and name it as 'months'.
Step-2:In Derived Expression use the below case statement and click on ok -
case
when extract(month,DATE_Column)=1 then 'JAN'
when extract(month,DATE_Column)=2 then 'FEB'
when extract(month,DATE_Column)=3 then 'MAR'
when extract(month,DATE_Column)=4 then 'APR'
when extract(month,DATE_Column)=5 then 'MAY'
when extract(month,DATE_Column)=6 then 'JUN'
when extract(month,DATE_Column)=7 then 'JUL'
when extract(month,DATE_Column)=8 then 'AUG'
when extract(month,DATE_Column)=9 then 'SEP'
when extract(month,DATE_Column)=10 then 'OCT'
when extract(month,DATE_Column)=11 then 'NOV'
when extract(month,DATE_Column)=12 then 'DEC'
end
Step-3: Click on derived Column 'Months' and go to 'Structure' tab in File Menu and then click and 'Pivot list to Cross tab '
Step-4: Run and check the report.
Thats it ..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
how you create security to reports?
how to merge 2 crosstabs thans
What is the difference b/w macros and prompt?
How to apply securities for reports in cognos connection?
Can you define a datastore in cognos?
Can you define drill across?
------------------What is Inline Query?
Why need staging area database for dwh?
i was asked what are the caluclations done by you in your report? plz give reply
What do you understand by the term 'model durability'?
How can we Maintain the Cube Security by Category level and Dimension level ?
hi all i am searching for cognos jobs pls inform about the jobs to:santosh.koora@gmail.com
what are the names of the reports that you prepared?
How can we import Excel data in to FWM?Wt is mean by Ragged dimensions?where can we observe the Regular dimensions & measure dimensions?
----------------Describe DWH Architecture?