Topic
  • 1 reply
  • Latest Post - ‏2013-10-28T19:51:57Z by JAntley
Jeen
Jeen
1 Post

Pinned topic What is the Cognos query expression for 'Current Month and Year'

‏2013-10-08T10:53:20Z |

I have created a Monthly Work Log in Cognos Report Studio. In this report, I get the data for the current month and year that is running in the system. The data is pulled from JIRA to Cognos.

In the Cognos' 'Query Explorer' > Details Filters, I have mentioned for:

  • Current running YEAR  as      ---->   [Year] = 2013
  • Current October MONTH as   ---->   [Month] in (10)

(For sample see the attached file query1.jpg)

In this case, what happens is that every year, I will have to change the year from 2013 to 2014, and so on. Same with the month, every 1st of the month I will have to change it from 10 to 11, and so on for the next months. This is creating a problem --- every month I need to remember to manually change the month so that I get the report on day to day basis for a particular month.

I am looking for an expression, where I can automate it such that it looks like [Year] = [Current year in system] and [Month] in (Current month in system).

Can someone help me to get that expression. (Consider me as a layman in creating such expressions)

Jeen

(Note: I also attached image of the report, when generated-- only for your understanding.)

Attachments

Updated on 2013-10-08T11:13:14Z at 2013-10-08T11:13:14Z by Jeen