Advanced Drilldowns In Graf-FX
Graf-FX will allow you to drill down using a combination of different query limiting techniques as illustrated in the following example
This would result in a SQL query for the second level as follows
Select Region , sum(Sales*Budgets)/sum(Budgets) from zSales_Demo where (SalesDate >= #14-Mar-95# and SalesDate <= #28-Jun-95# ) Group By Region;
Drilldown Filters
When drilling your data, the standard filtering operator utilised is where a field can be equal to "=" a certain value. Graf-FX supports a lot of other comparison operators such as (<, >, <>, <=, and >=). For example, you can find orders placed before 1-Jan-93 or products that have between 10 and 35 units in stock. You can change the default operator used by clicking on the combo box as follows
Alternatively right click in the operator box that you are interested in and a large choice of options will be presented.
If you choose the Like or not Like Comparison Operators, you must modify the field selector to include a Wildcard as in the example below.
This will produce a drilldown SQL query as follows
Select ProductName ,Sum(Sales) as SumSales from zSales_Demo where Region Like 'G*' Group By ProductName;
You can also select two comparisons in the one drilldown filter and choose between the logical operator "AND" or "OR". To do this click in the field where the "AND" or "OR" is displayed and it will change as follows
The use of logical operators and comparison filters such as less than and greater than can get confusing so viewing the sql that is generated can help resolve queries that do not seem to be working.
To see the sql, first click the
toggle button and then the
button.