Dynamic table joins should account for calculated fields
Yellowfin tries to be pretty smart when it comes to generating SQL and that's a good thing. When you build a report off of a view, Yellowfin looks at what fields the report is using and only joins to the tables those fields belong to and excludes any "unused" tables in the view. This helps speed up the db query.
Unfortunately, this process does not account for calculated fields. When I create reports using calculated fields, Yellowfin does not check to see what fields those calculations are based on and include the necessary tables that house those fields. Consequentially, the report will not run unless I add non-calculated dimensions or metrics from each of the tables my calculation relies on, even if I have no desire to include any of those dimensions or metrics in my report. Sometimes I then have to artificially group those metrics/dimensions into a single group and hide the column on my report to get the data to aggregate correctly.
Furthermore, when you group a field into only one group, the SQL that Yellowfin generates is totally wonky:
CASE WHEN 1 = 0 THEN CAST( "Schedules"."LDate" AS VARCHAR ) WHEN "Schedules"."LDate" IS NOT NULL THEN N'Group of all dates' ELSE CAST( "Schedules"."LDate" AS VARCHAR ) END,1=0 is always false, so no need to include that, then you're only including non null dates in the group and if the date is null you're going to cast it as a varchar for some reason? (which still results in null). Maybe someone who knows SQL better than me can explain how this code is better than simply:
N'Group of all dates',Long story short, Yellowfin should save the associations between calculated fields, the fields those calculations rely on, and the tables that house those fields so that when we include calculated fields on our reports, the necessary tables will be joined in the SQL so that our reports will run without extra tinkering.