I am trying to use the filter function in my Report Filters.
Below is my SQL statement in the report filter but it throws an error that Filter needs an aggregate measure in the first expression.
Finance.Date = FILTER(Max(Finance.date) USING ABC."Report Period" = 'Daily" AND DEF."Region"="NA")
Is there something that I am missing here.
The requirement is to match the date with the max date using the conditions mentioned above in the filter function.
Any help will be greatly appreciated.
Exact Error: State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22038] Function FILTER requires at least one measure attribute in its first argument. (HY000)
Edited by: vjbez1 on Nov 14, 2012 6:34 AM
Filter function required a metric and works on metrics only, in your case its date ie Max(Finance.date)
Pls mark as correct if its correct.
I would suggest to convert this specific filter as SQL using Advanced button.
Could you please help me with how I can use the conditions on (MAX(Finance.date)) in the filter by converting to SQL.
what I mean is, Max(Finance.date) where xxx=yyy and eee=uuu How to write this condition?