Cognos Analytics

Expand all | Collapse all

User defined functions

  • 1.  User defined functions

    Posted 26 days ago

    We want to create a user defined function in cognos, which will calculate the business hours between 2 dates.
    The parameters to the function will be - StartDate, EndDate, fromTime,toTime,NoOfDays

    Is there a way in cognos to create a user defined function or a macro function?


    Vaibhav Pujari

  • 2.  RE: User defined functions

    Posted 25 days ago
    Hi Vabhav,

    Specifically addressing Macro Functions:

    Cognos Analytics:

    An additional outside source for Macro Functions::

    Macro Functions:

    Creating Custom Report Functions:

    Creating Custom Report Functions and Function Sets:

    An excellent source of information in terms of calculating business hours between two dates, the following link provides options to calculate your start and end dates.  It also provides suggestions on simplifying the processes of creating your user defined functions.

    There is a process you go through in IBM in creating and calculating start and end dates.  The above stated links will guide you in the right direction.

    I found the information on creating report expressions helpful because some expressions are available by default, such as Today(), ReportDate(), ReportName().  There's also a section on defining functions, identifying functions in the function definition service, and then creating custom functions (user defined).

    I sincerely hope this helps Vabhav.


    Yvonne R. McGinnis
    DevOps (hopeful), Systems Administration
    Obama Foundation, Chicago
    Chicago Cato, Illinois