If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

how to get last day from months range..??

Started by 22rakesh, 08 Jul 2016 01:23:52 AM

Previous topic - Next topic

22rakesh

can any one help me out to find out how to get last day from months range...
I have to pass display data for last day from month range...?

I have to display month wise data in the report with the condition that outcome should display data only for the last day of selected month range.

MFGF

Quote from: 22rakesh on 08 Jul 2016 01:23:52 AM
can any one help me out to find out how to get last day from months range...
I have to pass display data for last day from month range...?

I have to display month wise data in the report with the condition that outcome should display data only for the last day of selected month range.

Hi,

What do you mean by "selected month range"? I assume you have a prompt - are you using a relational or a dimensional package? Is the prompt based on dates, on month numbers, on month names, something else? Can you explain how you should "display month wise data" when your requirement appears to be to display data only for a single day? Why would you prompt for a range of months when all you appear to be interested in is the last day? What is the prompt currently being used for? A filter? A dimensional expression? A calculated item? Something else? Can you provide details?

MF.
Meep!

22rakesh

hi,

Its a dimensional package, and we have strict design patrons...
Report is prompting with financial years(ie 2016-2017) with corresponding "from month" to "to month" (Returning Name of the month) range. With these month range, we have to display data for last day for the particular month.

MFGF

Quote from: 22rakesh on 08 Jul 2016 04:12:43 AM
hi,

Its a dimensional package, and we have strict design patrons...
Report is prompting with financial years(ie 2016-2017) with corresponding "from month" to "to month" (Returning Name of the month) range. With these month range, we have to display data for last day for the particular month.

Hi,

We can't see your report or your data, so we can only help if you give us enough details to understand the scenario here. What does "Returning Name of the month range" mean? How can a month range have a name? What is being returned by the prompt - a member, a set of members, an attribute, something else? How does your month prompt work - ie how has it been coded? What is driving it in the report - a dimensional expression (and if so, what is it?), a detail filter (if so, how is it coded?), something else? How does it relate to years, which also appear to be prompted for?

If your prompt is returning a set of month members (for example), why not change it to prompt for a single month, or even just the day you require? If for some reason you can't, then we need to understand what sort(s) of object(s) your prompt is returning so we can determine how to isolate the last day.

MF.
Meep!

22rakesh

Problem Solved with simple code...

item(tail(members([Day])),0)




sixajd

Cognos also has a built in function _last_of_month that you may be able to use in a situation such as this.


_last_of_month ( date_expression )
Returns a date or datetime, depending on the argument, that is the last day of the month represented by "date_expression".