This example shows the total sale and profit per month and filtering per year.
You see the parameterization of the box:
- Selector type of Polar graph.
- Column of the sentence with which you want to divide the circumference, in this case the month of the invoice the_month.
- Filter by combo of the column the_year and thus be able to filter the graph by years.
- SQL statement to execute, in this case:
<select> <columns> YEAR(invoicedate) the_year, MONTH(invoice.invoicedate) <alias name='the_month' />, SUM(invoiceline.quantity * invoiceline.unitprice) <alias name='total' />, SUM(invoiceline.quantity * invoiceline.unitprice) - SUM(invoiceline.quantity * track.costprice) <alias name='the_profit'/> </columns> <from table='invoice'> <join table='invoiceline'> <on>invoice.invoiceid = invoiceline.invoiceid</on> <join table='track'> <on>invoiceline.trackid = track.trackid</on> </join> </join> </from> <group>1,2</group> <order>1,2</order> </select>
* Starting from the table of invoices and grouping by year and month, obtaining the total sale and benefit
5. In the series are added the columns 'total' and 'the_profit' one with render columns and another with render area.