top of page

Are You Counting Records or Filled Fields in a Business Report?

Oct 25
4 min read
COUNT Rows vs Filled Fields in Business Reports: Name the population; Count rows and values; Explain the difference.

A dashboard says a team received eight requests. The intake export contains ten. Both numbers may have been produced correctly by their respective queries: one counted rows, while the other counted rows with an assigned owner. The practical problem is the label. “Requests received” and “requests with an owner recorded” are different quantities.


This review helps a project owner and an analyst agree on what a SQL count represents. The examples use PostgreSQL and synthetic intake records. They are a method for checking an implementation, not a claim about any FutureOS dataset.


State what one counted item represents


Before opening the query, write a sentence such as “One item is one accepted intake request created during the reporting window.” Name the unique request identifier and the date field that establishes membership in the window. Then identify which fields may still be missing when the request first arrives.


An owner field may be empty because assignment is pending. A completion date may be empty because work is unfinished. Neither absence necessarily means the request itself does not exist. The report owner should approve those interpretations instead of leaving the analyst to infer them from a column name.


An illustrative ten-record fixture


Create ten synthetic request rows with unique identifiers. Give eight rows a non-NULL owner identifier and leave two owner identifiers NULL. Under the definition above, the request count is ten, the recorded-owner count is eight, and the missing-owner count is two.


Write all three expected values before running a query. This creates a useful diagnostic triangle: total population, populated values, and missing values. If those quantities do not reconcile, inspect filtering, grouping, and joins before changing the chart.


Read the aggregate's argument


PostgreSQL's aggregate function documentation distinguishes COUNT(*), which counts input rows, from COUNT(expression), which counts rows where that expression is not NULL. The expression inside the parentheses is therefore part of the metric definition.


For the fixture, “SELECT COUNT(*), COUNT(owner_id) FROM requests” should produce ten and eight. Name the output columns according to their meanings rather than calling both “total.” This simple pairing is a useful review view even when the final dashboard shows only one measure.


Do not treat a non-NULL value as evidence that the assignment is valid. A populated identifier could refer to an inactive owner, or a text field could contain a placeholder. Presence, validity, and business acceptance require separate checks.


A blank string is a separate case


Add a text value containing an empty string to a controlled fixture if your source system can produce one. Decide whether that is considered supplied information. If the application treats it as missing, normalize or classify it deliberately before counting. Preserve the original value where needed for investigation.


This is a business-data rule, not an invitation to replace every unusual value automatically. A contributor should be able to explain how a source value became a reporting category.


Check the rows entering the aggregate


Even COUNT(*) can answer the wrong question when its input is wrong. Inspect a sample of the rows immediately before aggregation. Verify one row corresponds to the intended counted item, and check that date, status, and permission filters match the approved population.


If joining a request to several comments creates several rows per request, the count no longer measures requests. Resolve that separate cardinality problem at the query design level. Changing the aggregate without understanding its input may hide the duplication while leaving other totals incorrect.


For grouped reports, record the same population rule for each group. Keep unassigned requests in a visible group or an explicitly documented exception count. Otherwise, a total on the summary page may exceed the sum of the displayed teams without any explanation.


Review an empty reporting window


Include a fixture with no eligible requests. Decide what the interface should show: a zero count, an explanatory empty state, or both. A ratio such as assigned requests divided by all requests also needs a defined behavior when there are no eligible rows.


Avoid presenting an invented percentage for that case. “No requests in this window” communicates the observation more directly. Keep that presentation decision separate from whether an underlying query returns a row containing a zero or a grouped result containing no rows.


Publish the meaning with the number


A useful handoff contains the population sentence, the aggregate expressions, the ten-record fixture, and a screenshot or export of the resulting labels. Ask a business reviewer to explain why ten and eight differ without reading SQL.


If the reviewer cannot do that, revise the labels or supporting description. The goal is a report that tells readers exactly what was counted, including what the number leaves out, so they can use it for the right operational decision.


Continue with Write a Metric Definition Before Debating the Dashboard Number for the related planning decision.


The published FutureOS introduction describes the project as being in prelaunch. Use this guide to prepare a concrete project discussion; it does not announce an available FutureOS feature.



Prepared with AI assistance. Primary sources checked on October 25, 2026. Examples and procedures are illustrative editorial guidance, not FutureOS product announcements or an independently reviewed assessment.

Comments


bottom of page