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
What do you understand by the term ‘frame manager' in cognos and write all the layers of the framework manager model?
how many reports do u create in ur project?i don't have real time exp..tell me based on ur exp..for interview pt of view,don't say it depends on ur project and u? thanks in advance..
What are cognos connection initial page components?
-----------With out using DrillThrough how to do Reports?
I have a reports on cognos ep7series version3 with database SQl2000.Now i am migrating database SQL2000 to SQL2005.Then What happens to cognos reports and also there is reports cubes then how can i handle this problem please give me step by step solution b'coz i am new to cognos ep7series
What is the enterprise class platform architecture of cognos 8?
what r the reports u faced critical and how it can be solved .. any once can u give a best ans for interviw
Suppose you run a report with empty data, how will you inform the end user that it has no data while running the report in report studio? Is it possible, if so how?
What is the importance of having monitor service in cognos?
Which studio is used to create reports?
Why cognos decision stream is used?
Can anyone give me the url for cognos forum which is similar to forumtopics.com/busobj for business objects?
how to create cubes in transformer ?
I have ten columns that needs to be totalled... but some columns are empty...how do i get sum all the columns even if sum are empty? Can i get a total of the rows instead of columns? if yes, what is the function to be used?
how u will design the report if the objects are available