{ FIXED [Customer] : MIN([Date]) } returns each customer's earliest invoice date, the usual start of a cohort or acquisition analysis. It ignores the view, so a customer who buys from two teams shows the same first date under both. In SQL: min(min(Date)) OVER (PARTITION BY Customer) over the grouped rows.
Updated · Checked on the xmetric engine
What is the syntax?
{ FIXED [Customer] : MIN([Date]) }
dimensions
the fields the aggregate is grouped by, whatever the view shows.
aggregate
MIN([Date]) for the first date, MAX([Date]) for the latest.
Returns a date per row: the earliest date for that customer across the data source.
What does it return, and what is the SQL?
Each example runs on the same 12 sample rows twice: the Tableau formula on the xmetric engine, and the SQL in DuckDB.
When did each customer first buy, shown per team?
Tableau
{ FIXED [Customer] : MIN([Date]) }
SQL (DuckDB)
SELECT Team,
Customer,
min(min(Date)) OVER (PARTITIONBY Customer) AS result
FROM input
GROUPBY Team, Customer
ORDERBY Team, Customer
Aster's first invoice is with Pine on 20 December 2025, and its Cedar row shows that date too.
Team
Customer
Result
Ash
Fern
2026-01-20
Ash
Gale
2026-03-11
Cedar
Aster
2025-12-20
Cedar
Birch
2026-01-12
Elm
Dahlia
2026-01-08
Oak
Holly
2026-01-15
Pine
Aster
2025-12-20
Pine
Clover
2026-02-14
✓ The Tableau formula and the SQL return the same 8 rows.
What is each customer's first invoice date?
Tableau
{ FIXED [Customer] : MIN([Date]) }
SQL (DuckDB)
SELECT Customer, min(Date) AS result
FROM input
GROUPBY Customer
ORDERBY Customer
With only Customer in the view, a plain GROUP BY gives the same dates.
Customer
Result
Aster
2025-12-20
Birch
2026-01-12
Clover
2026-02-14
Dahlia
2026-01-08
Fern
2026-01-20
Gale
2026-03-11
Holly
2026-01-15
✓ The Tableau formula and the SQL return the same 7 rows.
Where does a straight translation go wrong?
Common mistake
Why does GROUP BY Team, Customer give Aster a later date under Cedar?
Grouping by the view finds Aster's first Cedar invoice, 5 January 2026. FIXED ignores Team and keeps the customer's overall first date, 20 December 2025.
Tableau
{ FIXED [Customer] : MIN([Date]) }
Tempting SQL
SELECT Team, Customer, min(Date) AS result
FROM input
GROUPBY Team, Customer
ORDERBY Team, Customer
SQL that matches
SELECT Team,
Customer,
min(min(Date)) OVER (PARTITIONBY Customer) AS result
FROM input
GROUPBY Team, Customer
ORDERBY Team, Customer
Team
Customer
Tableau
Tempting SQL
SQL that matches
Ash
Fern
2026-01-20
2026-01-20
2026-01-20
Ash
Gale
2026-03-11
2026-03-11
2026-03-11
Cedar
Aster
2025-12-20
2026-01-05
2025-12-20
Cedar
Birch
2026-01-12
2026-01-12
2026-01-12
Elm
Dahlia
2026-01-08
2026-01-08
2026-01-08
Oak
Holly
2026-01-15
2026-01-15
2026-01-15
Pine
Aster
2025-12-20
2025-12-20
2025-12-20
Pine
Clover
2026-02-14
2026-02-14
2026-02-14
✓ The SQL that matches returns the Tableau result on every row; the marked cells are where the tempting SQL differs.
How do I write it in Snowflake or BigQuery?
The first example, written for each warehouse from its documentation. These are not run here; DuckDB is.
Snowflake
SELECT Team,
Customer,
MIN(MIN(Date)) OVER (PARTITIONBY Customer) AS result
FROM input
GROUPBY Team, Customer
ORDERBY Team, Customer
Ordinary dimension filters on the Filters shelf do not: FIXED is computed before them. Add a filter to context (or filter the data source) to make it count only the rows that survive. In SQL, a context filter is a WHERE inside the subquery or window; an ordinary filter is a WHERE that does not reach it.
How do I build an acquisition cohort?
Use the first date as a dimension: DATETRUNC('month', { FIXED [Customer] : MIN([Date]) }) on Columns, then COUNTD([Customer]) or SUM([Revenue]).
How do I count days since the first invoice?
DATEDIFF('day', { FIXED [Customer] : MIN([Date]) }, [Date]) per line; in SQL, date_diff('day', min(Date) OVER (PARTITION BY Customer), Date).