The Scenario
The memo goes out Monday. You're an equity research associate comparing 10 software companies on FCF yield — which means you need four quarters of operating cash flow, capex, and free cash flow for each one, ranked cleanly. It's Friday afternoon. Your senior analyst wants a draft by end of day. You have the tickers in column A and a blank table the rest of the way across.
The bad version:
- Navigate to the Twelve Data cash flow statement endpoint, pull the first company's last four quarters, identify the correct field names (sometimes "capitalExpenditures," sometimes "capEx," depending on the API version), and paste the values into the table row.
- Repeat for all 10 companies, rechecking field names each time because the response schema is slightly inconsistent across companies.
- Find that two companies have different fiscal quarter end months, which means your "Q4" column contains data from different calendar periods for different companies. Spend 30 minutes deciding whether to realign by calendar quarter or by fiscal quarter before giving up and leaving a footnote.
The draft lands late. The footnote stays.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet. It sees the tickers in column A and, through its built-in Twelve Data integration, pulls the trailing four quarters of cash flow statement data for each company and writes it into a structured layout — one row per company, period columns across the top.
Fetch the last 4 quarters of cash flow data from Twelve Data for each ticker in column A. Write period end date as column headers starting at column B, and for each company fill operating cash flow, capital expenditures, and free cash flow in separate sub-rows with field labels in column A.
What You Get
- Period headers across row 1 (most recent quarter first).
- Three sub-rows per ticker: operating cash flow, capex, and free cash flow (where free cash flow equals operating minus capex if not directly available).
- Fiscal quarter end dates noted so you can see which periods align across companies.
- Any quarter with no data flagged so you're not staring at a blank and wondering whether the company didn't report or the pull failed.
What If the Data Is Not Quite Ready
If you need annual cash flow data instead of quarterly
Pull consolidated annual cash flow statements from Twelve Data for each ticker in column A. Write the most recent fiscal year's operating, investing, and financing cash flows into columns B, C, and D respectively, with the fiscal year end date in column E.
If you want to calculate FCF yield using market cap from the same pull
Fetch the last 4 quarters of operating cash flow and capex from Twelve Data for each ticker in column A. Calculate trailing twelve month free cash flow by summing the four quarters, then fetch current market cap from Twelve Data and write FCF yield (TTM FCF / market cap) into column F.
If two companies in your list have overlapping ticker symbols across exchanges
For each ticker in column A, use the exchange specified in column B to scope the Twelve Data call. Fetch 4 quarters of cash flow data and write operating cash flow, capex, and free cash flow into columns C, D, and E with period headers in row 1.
Kill-chain: fetch cash flow data, calculate FCF yield, and rank the peer group in one prompt
Fetch the last 4 quarters of operating cash flow and capex from Twelve Data for each ticker in column A. Sum the four quarters to get TTM free cash flow. Fetch market cap from Twelve Data for each ticker. Write TTM FCF into column B, market cap into column C, and FCF yield into column D. Sort the rows by FCF yield from highest to lowest.
One prompt pulls the data, does the arithmetic, and delivers a ranked table.
Try It
Get the 7-day free trial of SheetXAI and open your peer comparison sheet with tickers in column A, then ask it to populate and rank the FCF table before your next team call. Also see building a fundamental data table and the full Twelve Data overview.
