Reputation: 163
I've been trying to filter my report by current month, by the way I'm using Cube datasource.
I tried using getDate(), current_date, {sysdate} combined with extract(), to_char(), to_date() functions but I'm encountering an error which leads me to search why, they said that you can't use these relational functions in DMR. Is there a workaround or another function that I can use?
To give you an idea I here is a sample filter that works, but I need to replace 'JUL' by the current month:
caption([Airtime Sales/Airtime Sales - Aired Spots].[By Month].[By Month].[Air Date - Month]) = 'JUL'
Thank you in advance!
Upvotes: 0
Views: 672
Reputation: 163
Got the answer on my question. For others who might encounter the same problem or scenario, here is what I did: 1. I created a data Item which holds the numeric value of each month by using case statement. Ex. CASE WHEN (caption([Air Date - Month]) = 'JAN') then (1) . . . ELSE (12) END
2. Then I used this data item in filtering the report. [Data Item] = extract(month,current_date) That solves my problem, my report is know filtered on the current month.
Upvotes: 1