Ad Hoc Reporting Solution
Working example built by Estrada Consulting, Inc. for RFP 20A0408, California Department of Transportation

Report builder

Pick a subject area, a role and the fields. Everything on the left is the semantic layer, so nobody types a table name or a join. The icons mark the three kinds of field that requirement 8 asks be distinguishable: a dimension attribute, a calculated measure, a detail attribute.

Subject area

One row per payment line, as posted

Your role

Rows are limited to the user's own district. A Typical User in District 4 cannot read District 7's payments.

Dimension attributes
Calculated measures
Detail attributes
Pre-defined functions

Requirement 9. A user picks the State fiscal year without having to know it begins in July.

Generated SQL

Requirement 5. This panel is read only, and this is the statement that runs. Nothing is rewritten between here and the warehouse.

SELECT
  dim_org.district_name AS "District",
  dim_fund.fund_name AS "Fund",
  SUM(fact_expenditure.amount) AS "Amount",
  COUNT(*) AS "Payment lines"
FROM fact_expenditure
  JOIN dim_date ON fact_expenditure.date_key = dim_date.date_key
  JOIN dim_org ON fact_expenditure.org_key = dim_org.org_key
  JOIN dim_fund ON fact_expenditure.fund_key = dim_fund.fund_key
  JOIN dim_account ON fact_expenditure.account_key = dim_account.account_key
  JOIN dim_project ON fact_expenditure.project_key = dim_project.project_key
  JOIN dim_vendor ON fact_expenditure.vendor_key = dim_vendor.vendor_key
WHERE dim_org.district_code = :home_district
GROUP BY
  dim_org.district_name,
  dim_fund.fund_name
ORDER BY SUM(fact_expenditure.amount) DESC
LIMIT 200

Preview

Requirement 21. The result set is counted over the same joins and filters before any rows are returned.

What this query will produce
Result rows5
Tables joined6
Grouping fields2
ComplexityBelow every threshold.

Result

5 rows returned in 72 ms. Amounts are printed as exact decimals: requirement 13 forbids truncating or rounding them.

First 5 rows
DistrictFundAmountPayment lines
District 4, OaklandState Highway Operation and Protection17,583,005.251,845.00
District 4, OaklandTrade Corridor Enhancement Account16,768,969.191,890.00
District 4, OaklandPublic Transportation Account15,993,495.721,829.00
District 4, OaklandFederal Trust Fund15,988,229.261,824.00
District 4, OaklandState Highway Account15,663,653.521,876.00

Requirement 36 asks for export to text, HTML, comma separated values, Excel and PDF. Download these rows as CSV, which is the one of the five this example implements.