How does iDBQuery calculate derived metrics like margin, growth rate, or ratios?
iDBQuery calculates derived metrics by writing SQL that combines the underlying columns — gross margin as (revenue minus cost) over revenue, growth as period-over-period change, ratios as one measure divided by another. It runs the maths against live data and cites the source figures so you can check every input.
Most business questions aren't a single stored column — they're a calculation over several. iDBQuery handles the arithmetic so you don't write formulas.
- Composed in SQL. Ask for gross margin and it computes `(revenue - cost) / revenue` at whatever grain you asked for — per product, per region, per month.
- Period comparisons. Growth, MoM/YoY change, and run-rate come from windowing and self-joins across time periods, handling the date logic for you.
- Ratios and rates. Conversion rate, utilisation, AR days, and similar ratios are one measure over another, computed consistently.
If you've defined the metric in the semantic layer, iDBQuery uses that exact definition; if not, it derives a sensible one and shows its working. Because it displays the generated SQL and cites each input figure back to its source row, you can verify not just the result but every number that fed it — the revenue total, the cost total, and the division. That transparency is the difference between a black-box number and one you can defend in a board meeting.
Updated 2026-06-22