[DATA] Cardlytics 8-K thousands table scaled as millions, so get_key_metrics revenue is $63.249 billion instead of $63.2 million
Data Quality Issue Details
Issue Type:
- [x] Incorrect financial values (wrong numbers)
- [ ] Missing financial data (expected data not present)
- [ ] Calculation errors (formulas producing wrong results)
- [x] Data inconsistency (different values for same metric)
- [ ] Historical data problems (changes over time)
Environment
EdgarTools Version: 5.62.0 (main at commit 2323d732; release tag v5.62.0 at commit 5068cc54; both report 5.62.0, and the output below is identical on both) Python Version: 3.14.4 Operating System: Windows 11
Financial Data Details
Company/Ticker: Cardlytics, Inc. (CDLX)
Form Type: 8-K
Filing Date/Period: Filed 2025-08-06, accession 0001666071-25-000124, three months ended June 30, 2025
Statement Type: Earnings-release income statement (filing.obj().earnings)
Specific Metric/Concept:
- Financial line item: Revenue; Net Loss
- XBRL concept name: Not applicable. The amounts are in EX-99.1
cdlx_form8-kx2025q2xex991.htm, not in XBRL facts.
Data Issue
Expected Value:
- Amount: Revenue $63,249,000 (the release says "Revenue was $63.2 million") and Net Loss $(9,283,000). The statement of operations is headed "(Amounts in thousands, except per share amounts)", with Revenue 63,249, Net Loss (9,283) and Net Loss per share, basic and diluted, (0.18). The summary table is headed "(Dollars in thousands)" with the same Revenue and Net Loss cells.
- Source: EX-99.1 of the 8-K, read from the raw HTML.
- Page/section reference: the statement of operations, "(Amounts in thousands, except per share amounts)", and the highlights sentence "Revenue was $63.2 million". The statement foots, and its per-share figure ties only at thousands: 63,249 less total costs of 76,038 is operating loss (12,789); with other income of 3,506 the net loss is (9,283); and (9,283) divided by 52,750 thousand weighted shares is (0.18) per share.
Actual Value from EdgarTools:
- Amount:
get_key_metrics()returns revenue 63249000000.0 and net_income -9283000000.0, a thousand times too large.income_statement.scaleismillions. eps_basic is -0.18, because per-share rows are not scaled. eps_diluted is None, because the filing prints one row, "Net Loss per share, basic and diluted". This is noted as an observation only. - How obtained: the code below.
Code to reproduce:
from edgar import find, set_identity
set_identity("Your Name [email protected]")
earnings = find("0001666071-25-000124").obj().earnings
print(earnings.income_statement.scale)
print(earnings.income_statement.dataframe.loc["Revenue"])
print(earnings.get_key_metrics())
Output, identical on main (2323d732) and on v5.62.0 (5068cc54):
millions
Three Months Ended\n\n\nJune 30, - 2025 63249.0
Three Months Ended\n\n\nJune 30, - 2024 69636.0
Six Months Ended\n\n\nJune 30, - 2025 125147.0
Six Months Ended\n\n\nJune 30, - 2024 137244.0
Name: Revenue, dtype: object
{'revenue': 63249000000.0, 'net_income': -9283000000.0, 'eps_basic': -0.18, 'eps_diluted': None, 'period': 'Three Months Ended\n\n\nJune 30, - 2025', 'scale': <Scale.MILLIONS: 1000000>}
Cross-Verification
Have you verified this issue with:
- [x] Multiple time periods for same company
- [x] Multiple companies with same issue
- [x] Direct SEC filing comparison
- [ ] Other financial data sources
Affects multiple periods/companies?
- Companies tested: Cardlytics (0001666071-25-000124), Core Natural Resources (0001710366-25-000008), Duolingo (0001562088-24-000048), Kulicke & Soffa (0000056978-25-000078), Snail (0001641172-25-024808) and Gartner (0000749251-25-000044), each from its earnings 8-K
- Time periods tested: one earnings 8-K for each company, except Gartner, which has five earnings 8-Ks from 2025-08-05 to 2026-08-04; all five return scale
unitsfromincome_statement.scaleon main; the cause was traced for the 2025-08-05, 2025-11-04 and 2026-02-03 releases, and for the 2026-05-05 and 2026-08-04 releases only the size of the revenue returned was checked, not the filing. For Cardlytics, the same table also gives the 2024 and six-month columns at the same scale. - Pattern observed: the dollar lines are 1,000 times too large for the four filings whose statements are captioned in thousands (Cardlytics, Core Natural Resources, Duolingo and Kulicke & Soffa). For Snail, whose statement prints whole dollars and has no scale caption, they are 1,000,000 times too large. For Gartner, whose statement is captioned in millions, revenue comes back as 1686.5 instead of 1,686,500,000. The per-share values that are returned are unscaled and match the filings in all six; eps_diluted is None for Cardlytics and Core Natural Resources.
Output for the other companies on main (2323d732) and on v5.62.0 (5068cc54), identical on both:
from edgar import find, set_identity
set_identity("Your Name [email protected]")
for acc in ["0001710366-25-000008", "0001562088-24-000048", "0000056978-25-000078",
"0001641172-25-024808", "0000749251-25-000044"]:
earnings = find(acc).obj().earnings
km = earnings.get_key_metrics()
print(acc, earnings.income_statement.scale, km["revenue"], km["net_income"], km["eps_basic"], km["eps_diluted"])
0001710366-25-000008 millions 467188000000.0 30821000000.0 1.04 None
0001562088-24-000048 millions 150985000000.0 12117000000.0 0.29 0.26
0000056978-25-000078 millions 177558000000.0 6379000000.0 0.12 0.12
0001641172-25-024808 millions 22185750000000.0 -16562706000000.0 -0.44 -0.44
0000749251-25-000044 units 1686.5 240.8 3.12 3.11
Expected Behavior
What should happen: A statement captioned "(Amounts in thousands, except per share amounts)" is scaled by 1,000, so Cardlytics revenue is $63,249,000 and net loss is $(9,283,000). Snail's statement, which has no scale caption and prints whole dollars, is not scaled, so its revenue stays 22,185,750. Gartner's statement, captioned in millions, is scaled by 1,000,000, so its second-quarter revenue is $1,686,500,000. Per-share values stay unscaled.
Data validation rules:
- Revenue of about $63 billion contradicts the release's own "Revenue was $63.2 million" sentence.
Additional Context
The income statement is found and its cells are read correctly; only the scale is wrong. Where it goes wrong, on main and v5.62.0:
_detect_table_scale(edgar/earnings.py) step 6, added for #633 in 9f920af3, reads onlytable_node.parent.children. In the Cardlytics release each of the 12 tables, and in the Gartner release the income statement, sits in its own one-child wrapper container, so the caption is one level up and is not read. Looking one level up finds a caption for all 12 Cardlytics tables: thousands for eleven and, for the third-quarter guidance table, millions. In the Gartner release, the income statement (earnings.document.tables[7], 20 rows by 1 column) has a one-child parent, and one level up gives millions.- The fallback is
EarningsRelease.detected_scale(a7f10b16, v5.23.3, #693 and #700). It tests the "(in millions" pattern before "(in thousands". The Cardlytics release contains one "(in millions, except for percentage change rates)", in the Q3 guidance sentence, and eleven "(Dollars/Amounts in thousands" captions, so the document scale is millions, and tables the parser cannot tie to a caption inherit it. The Gartner release's document scale is units. The pattern needs "in millions" directly after the opening parenthesis (or after "dollars", "amounts" or "figures"), so the statement caption "(Unaudited; in millions, except per share data)" does not match it. - Snail is the whole-dollar variant. Its statement has no scale caption to find, so a fix to step 6 does not change it. Its statement is read as millions only through the document-level fallback in item 2, because its non-GAAP tables are labelled "(in millions)".
Before a7f10b16 the same Cardlytics tables read as units, which was also wrong; from a7f10b16 (v5.23.3) on they read as millions.
Related: #633 (its tested-filings table lists this accession with scale millions, and the Gartner accession 0000749251-25-000044 with scale billions), #693, #695, #700, and #1556 (open pull request on table header detection, which step 2 of _detect_table_scale reads).
Impact Assessment:
- [ ] Minor (affects specific edge case)
- [ ] Moderate (affects common use cases)
- [x] Major (affects core financial calculations)
- [ ] Critical (produces completely wrong results)
Data quality issues are high priority and will be verified against official SEC filings. Accuracy is fundamental to EdgarTools.
@dgunning, here is our current thinking on the root cause, proposed behavior, and coordination with other issues.
Root Cause:
Bio-Rad's mixed caption specifies money in millions and shares in thousands, but current extraction chooses thousands for the monetary rows. Different caption locations use keyword precedence without consistently associating each scale with its measure.
Proposed Behavior:
Bind a scale to the measure its clause describes and apply that monetary-caption rule consistently within existing local table boundaries. Preserve periods, raw amounts and signs, keeping share-count, per-share and percentage rows unscaled under the current API. This fixes the surviving captioned monetary case while leaving share-count normalization and the uncaptioned Snail case unresolved. The PR therefore only partially addresses #1779 and should not close it.
Coordination:
Recommend a separate PR for the surviving mixed-caption case. #1794 already repaired the Cardlytics/Gartner cases within #1779 and adjacent #1775, #1776, #1777, #1778, #1780 and #1781; retain those landed controls.
Below, please find the full design document. Please let me know your thoughts.
Brian
Attachment: design-public.md, Associate an earnings-table scale with the monetary clause.
AI assistance: Codex; GPT-6.1 Sol (High) for scouting and comment writing; GPT-6 Astra (Max) for architecture and design, plus a separate dedicated financial statement review of the revised proposal.