COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: andy.rock on 08 Aug 2024 03:03:22 PM

Title: Filter for current month minus current day
Post by: andy.rock on 08 Aug 2024 03:03:22 PM
Hello...I am new so I hope this is the rigt spot to post. I am trying to filter the below to current month minus the current day but I cannot figure it out. Hoping somoene can help.

[Sales].[Invoice Established Date].[Actual Date]

I am new to these report builds so any help or advice would be greatly appreciated.

Thanks!
Title: Re: Filter for current month minus current day
Post by: cognostechie on 08 Aug 2024 03:33:35 PM
You probably don't have current day's data in your Data Warehouse anyway so use this as the filter:

[Sales].[Invoice Established Date].[Actual Date] >= _first_of_month ( current_date )

If you have current day's data then use this:

[Sales].[Invoice Established Date].[Actual Date] >= _first_of_month ( current_date )  and
[Sales].[Invoice Established Date].[Actual Date] < current_date

In the report, when you open a data item, there are functions available on the left pane. Look for data/time functions.
Title: Re: Filter for current month minus current day
Post by: andy.rock on 09 Aug 2024 05:40:03 AM
You are right on current day. I just used the first function you provided and it is doing exactly what I needed. Thanks for your help!