Guides · For agents
COUNTIFS and SUMIFS on a file too big for Excel
Ask Sift to count the rows that meet your conditions and add up one column over them. That is COUNTIFS and SUMIFS in one call, read straight from the CSV, however many rows it has. In the test file, 8 of 24 sales lines are North and paid, worth 1,910.98.
Ask your agent
With Sift connected (setup takes three steps), paste this and swap in your own paths.
Use Sift to count the rows in /path/to/sales_lines.csv where region is North and status is paid, and total the amount column. Then do the same for status refunded in any region.
What Sift sends back
One amount is written 1,085.50, with a thousands comma. Sift reads it as a number. The blank and the n/a are left out of the total and the average and counted, never added as 0.
What to do next
- One line says north in lower case, and an exact match leaves it out. Ask for region in North or north: 9 rows, 1,974.98.
- Add more conditions the same way: a date in the last 30 days, an amount over 500, a status that is not cancelled. Each call answers one question.
- If you also need to clean the big file by hand, see Large file mode in the browser cleaner.
Questions
Yes. eq matches the value exactly, so North and north are different. Excel's COUNTIFS ignores case. List both spellings with in if you want both.
They are left out of the total and the average, and Sift counts them and warns you. They are never treated as 0.
For CSV and Parquet files over 100 MB, Sift switches to its DuckDB engine, which runs the same checks as SQL and does not need the file to fit in memory. Both engines give the same numbers.
Excel stops at 1,048,576 rows. Sift reads the CSV itself, so Excel's limit does not apply. In Sift's tests, the DuckDB engine gives exactly these numbers for this file too.