I am trying to add SQL to a Filter that involves the year attribute (To show data for current year)
This is the following SQL I have entered for this filter :
"Time Period"."Year" = "SELECT DATENAME(YEAR, GETDATE())" However my report does not display, after this filter has been modified (with the SQL)
Hi Hyder many thnaks for your correct answer, 10 points awarded
In relation to your ansrwer , could you tell me what is wrong with the following Filter with SQL :
*"Time Period"."Full Month Name" = Month(Current_Date)*
I am trying to get the full month name from SQL e.g December
Please could you help
Month(Current_Date) gives you the current month number and not name. Hence, when you try to do this:
"Time Period"."Full Month Name" = Month(Current_Date)
It might error out as you are comparing month name with month number.
Instead you can try using MONTHNAME(Current_Date). This will give you the month name.
Also, you can apply these functions in column fx to see what these functions actually return. This will help you identify which functions you can use to compare with which columns in your filter.