Error Filtering on Calculated Field
Brand new to Yellowfin and trying to learn the ropes.
My database (SQL Server) has an integer field called ldate that stores dates in the format yyyyMMdd. I've pulled this field into a view and then added a calculated field that converts this integer to a date string using the function convert(varchar(8), ldate). I then used the Convert 'Text to SQL Date' option on the calculated field to get a proper date. Then I set up a filter on this new, calculated date.
When I built a dashboard and tried to use the date filter I get the following error:
Error retrieving results
Invalid column name 'ldate'.
UPDATE: If I add ldate as a column on my report table, then the filter works. The problem is that I want my table to aggregate data across the entire filter date range and not display any dates in the result table.
UPDATE: If I replace the filter on the calculated field with a filter on ldate, then I get the table data to aggregate in the way that I want, but now my filter is prompting the user for integers, rather than presenting a date picker.
UPDATE: I was able to get where I wanted by adding ldate as a column, then adding a grouping rule that would force all of them into a single group, then I hid the column on the table view. This allows the calculated date field filter to function and still aggregates all the data in the selected date range. This feels like a hack though and I would welcome anyone who can tell me a more proper way of doing it.
Is there any way to see the SQL it's trying to run that generates the error?
Is there any way to see the SQL it's trying to run that generates the error?
Hi Stephen,
yes, you should be able to see the SQL query by changing your logging level from INFO to DEBUG as described in the following knowledge base article:
https://community.yellowfinbi.com/knowledge-base/article/how-do-i-turn-on-debug-logging-within-yellowfin-log-file
and then hopefully the last SQL query in the debug log before the error is thrown will be the one you are looking for.
regards,
David
Hi Stephen,
yes, you should be able to see the SQL query by changing your logging level from INFO to DEBUG as described in the following knowledge base article:
https://community.yellowfinbi.com/knowledge-base/article/how-do-i-turn-on-debug-logging-within-yellowfin-log-file
and then hopefully the last SQL query in the debug log before the error is thrown will be the one you are looking for.
regards,
David
Hi Stephen,
just wondering how you got on with this issue?
regards,
David
Hi Stephen,
just wondering how you got on with this issue?
regards,
David
Replies have been locked on this page!