Top Customers by Sales
The widget shows a bar chart with sales data for up to ten customers. You can filter data based on these fields:
- Business Unit
- Period from
- Period to
- Number of customers (from 1 to 10)
Each bar represents a customer's net sales during the selected time range. Hover over a bar to view the exact sales amount. You can also click a bar to drill into detailed sales invoice transactions. Invoice details are displayed in a sortable grid with these columns:
- Sales Invoice ID
- Sales Invoice Reference
- Transaction Date
- Amount
From the grid, you can open the Sales Invoice Entry (SLI) function to view individual invoice records. The horizontal axis of the chart shows the sales amount and currency symbol that is set for the selected business unit. The vertical axis of the chart lists the selected customers.
To control access and ensure that the customer visibility aligns with user permissions, configure Data Access Groups (DAG).
Query logic
The widget ranks the top customers based on the total sales within a selected business unit and period range. The widget aggregates the total sales invoice amounts for each customer through approved sales invoices that fall within the defined period range. The calculation includes debit amounts from sales return notes. Data is retrieved from the sales ledger and is filtered by the values of the Business Unit, Period from, and Period to fields. Period values must be specified in a specific format, such as 005/2025, and validated to ensure that the start period is earlier than the end period.