cancel
Showing results for 
Search instead for 
Did you mean: 

Create a filter for the last day of the months

Former Member
0 Kudos

Hi,

I am trying to create a filter that can select the last day of the past month.

and I want to know if is possible create this type of filter.

an example of what I want

if month  = january then last_day = 31

else

if month = february then last_day = 28

Thanks in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Jose,

Have a look at this link - http://www.forumtopics.com/busobj/viewtopic.php?t=152613

You can use the logic in there for the End of Previous Month object depending upon your database type.

Regards,

Mark

Former Member
0 Kudos

Hi Jose,

In your query, you have mentioned as " filter that can select the last day of the past month"; however, in example, you have mentioned as

if month  = january then last_day = 31

else

if month = february then last_day = 28

Thats means last date of current date.

Could you please clarfiy on whether you are willing to extract last date of current month or previous month?

It is possible to create such filter at universe level; however, the syntax totally depends on the Reporting Database which you are using.

For example, in case of DB2, it can be created as:

SELECT (current date + 1 month)- day(current date)day as last_date from sysibm.SYSDUMMY1

You can convert the above logic as per your Reporting database and add it as a universe level filter.

Regards,

Yuvraj