Skip to content

Quarterly Financial Report Table

This example builds a regional quarterly revenue table with consistent number formatting, a highlighted totals column, and annotated footnotes.

The data

julia
using StyledTables, DataFrames

report = DataFrame(
    region = ["North America", "Europe", "Asia-Pacific", "Latin America", "Total"],
    q1 = [4.21, 2.83, 1.94, 0.72, 9.70],
    q2 = [4.55, 3.02, 2.10, 0.81, 10.48],
    q3 = [4.38, 2.91, 2.22, 0.79, 10.30],
    q4 = [5.12, 3.45, 2.67, 0.94, 12.18],
    total = [18.26, 12.21, 8.93, 3.26, 42.66],
)
5×6 DataFrame
Rowregionq1q2q3q4total
StringFloat64Float64Float64Float64Float64
1North America4.214.554.385.1218.26
2Europe2.833.022.913.4512.21
3Asia-Pacific1.942.12.222.678.93
4Latin America0.720.810.790.943.26
5Total9.710.4810.312.1842.66

Step 1: Headers, spanner, alignment, and formatting

Group quarterly columns under a spanner, right-align numeric columns, and format every number to two decimal places.

julia
label_dict = Dict(
    :region => "Region",
    :q1 => "Q1",
    :q2 => "Q2",
    :q3 => "Q3",
    :q4 => "Q4",
    :total => "Full Year"
)

tbl = StyledTable(report)
tab_header!(tbl, "Annual Revenue by Region"; subtitle = "Figures in USD billions")
cols_label!(tbl, label_dict)
tab_spanner!(tbl, "Quarterly" => [:q1, :q2, :q3, :q4])
cols_align!(tbl, [:q1, :q2, :q3, :q4, :total] => :right)
fmt_number!(tbl, [:q1, :q2, :q3, :q4, :total]; digits = 2)
render(tbl)
Annual Revenue by Region
Figures in USD billions
Quarterly
Region Q1 Q2 Q3 Q4 Full Year
North America 4.21 4.55 4.38 5.12 18.26
Europe 2.83 3.02 2.91 3.45 12.21
Asia-Pacific 1.94 2.10 2.22 2.67 8.93
Latin America 0.72 0.81 0.79 0.94 3.26
Total 9.70 10.48 10.30 12.18 42.66

Step 2: Highlight the totals column and annotate Q4

Bold the "Full Year" column, flag Q4 figures as preliminary, and credit the data source.

julia
tab_style!(tbl, :total; bold = true)
tab_footnote!(tbl, "Preliminary figures, subject to audit" => :q4)
tab_sourcenote!(tbl, "Source: Internal Finance, March 2026")
render(tbl)
Annual Revenue by Region
Figures in USD billions
Quarterly
Region Q1 Q2 Q3 Q41 Full Year
North America 4.21 4.55 4.38 5.12 18.26
Europe 2.83 3.02 2.91 3.45 12.21
Asia-Pacific 1.94 2.10 2.22 2.67 8.93
Latin America 0.72 0.81 0.79 0.94 3.26
Total 9.70 10.48 10.30 12.18 42.66
Source: Internal Finance, March 2026
1 Preliminary figures, subject to audit

The bolded "Full Year" column draws the eye to the aggregate. An auto-numbered superscript on Q4 flags preliminary figures; the source note credits the data origin.