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
in u r data u having duplicates how to fetch the latest data in our report?
What do you mean by drill through report?
Can you define drill down and drill up?
Why cognos scenario is used?
What are products of cognos?
How do you call a store procedure within a transformation?
What are all the types of gateway used in Cognos?
What is the diff between cognos 8.1 & cognos 8.2 & cognos 8.3? Measn whet are the enhancements are added in new versions(8.2& 8.3)?
Define the cognos reporting tool?
Please Answer this Questions: 1.In FWM We have to create Hierarchies, Condition is we don't know the correct levels in the Hierarchies, in this case how can we find out the levels (year->Quarters->month->day)in data? 2. In FWM Standalone Filter is for Reusable purpose & Embedded Filter we cant resuse.but is this possible to convert the Embedded filter to standalone filter? 3.What are the differences between Relational Database Model & Multi Dimensional Database? 4.In Drill Down/ Drill Up, How to specify the limits for example in a report there is 6 Drill down is possible, but i want only 3 Drill downs, the report should not allow 4 Th Drill Down.How to make this ? 4. What are the limitations in Select and Search Prompt ?
what are the dimensions that you have in your current project?list them?
how the values be passed to prompts in report studio? when a data item is dragged n dropped in to report, after the default query generated first which sql will the query query hit for processing means (native or cognos)? plz answers to these questions?
Can you define metrics designer?
hi, this is harish. i had finsihed cognos course recently.can some one help in the area of project explination, interview questions,real time scenarious....this is my maild id nanagupta907@gmail.com
Can the expiration parameter of 365 in the cognos 8 configuration how to increase common symmetric key lifetime in days