Building clean fundamentals for US companies from SEC company facts data (XBRL from 10-K and 10-Q filings) runs into the same problems again and again:
Same concept, different tags. Revenue alone can show up as Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, SalesRevenueNet and others, depending on the company and year.
Restatements. A later filing reports a different value for the same period, so you need to decide whether you want "as first reported" (point in time) or "latest known".
Missing Q4. Companies usually report the full year in the 10-K, so Q4 has to be derived as the annual figure minus Q1 to Q3.
Year-to-date cash flows.…