When I run the report it doesn’t look like it is working and is bringing in everything, regardless if it matches or not.
But I may be missing something to this filter and having trouble figuring out what so far…
It is difficult to test via BO. Can you paste your query in a database query tool and test there?
It might be handy to split your condition in two parts and create two universe objects for it. Then drag them in your report to verify the values they show.
Rereading your post I see that you have an OBJECT with a where condition. You’d better create a filter in the universe with this condition and add it to your query.
But reading it again I think I may be missing a piece or something.
If the datepart() of the tablename.date returns a 1(meaning the month is January) and
the datepart of the GetDate returns a one which running today will be January I think it would match fine within the Where filter.
Only I am returning ALL tablename.dates regardless if the month is January or August or December!?
Like I said if this didn’t work I think I need something in there or a different approach but drawing
Interesting; if I add the Month number to the Query it gets me closer to only bringing in the Month of January.
However, I am also bringining in January 2013, 2012, 2011. I ideally only want to bring in previous month of the time I am running the report so for the most part the years will be the same except if I run the report in January of 2015; the month should be December 2014.
This will match rows where the month and year of the date in question(table.DATE) matches against the month and year using GetDate() when the report is run.
I think this will run as well on January 2015 !?
Now back to figuring out something with Business Objects Explorer, fun fun fun.