Write the definition before choosing the chart

Imagine a Budapest luggage-repair workshop reviewing its weekly workload. One job contains three suitcases. A card labelled Completed could mean one job, three repaired items or one customer collection. These are different measures. Use a specific label and explain the counting unit beside the card or in accessible help.

For this example, propose Jobs first completed this week. Count each job once when its first completion falls in the reporting window. A cancellation alone is not completion. A job opened last month can still qualify this week. The app must preserve completion history to support this definition; current status alone is insufficient.

Separate work finished from work still waiting

Define Open jobs now as unfinished, non-cancelled jobs at the latest successful refresh, including older jobs. It is a current workload measure. Completed jobs this week describes activity during a period. Do not assume subtracting weekly completions from weekly arrivals gives the current backlog.

If a completed job is reopened, our proposed rule keeps its first completion in the historical total and includes it in open work again. The cards therefore cannot be added as mutually exclusive groups. Define the week explicitly, for example Monday midnight up to the following Monday midnight in Europe/Budapest, excluding that ending instant.

Make percentages and comparisons explainable

Do not label completions this week divided by arrivals this week a completion rate: the jobs may belong to different groups. For a rate, define one eligible group and its cutoff, then show the numerator and denominator. If no jobs qualify, show Not applicable rather than inventing a percentage.

Keep branch, period and status definitions visible when comparing results. MDN describes Intl.NumberFormat as a tool for language-sensitive number formatting. Use such formatting for readability; calculate from the underlying values and round the final display deliberately. Changing the interface language should not change which jobs are counted.

Show how current and complete the result is

Firestore’s aggregation queries use server responses and do not support live listeners or offline queries. Choose refresh behaviour deliberately. Frequent updates offer newer information but add server work; less frequent updates need clear timing. A refreshed-at label alone does not prove every card shares the same data cutoff.

Show zero only after a successful calculation finds no qualifying jobs. Keep loading, failure and unavailable values distinguishable. If an older result remains visible after an update fails, label it as old. Let staff open the contributing records with matching rules and an explicit as-of time where supported.

Approve totals against a small test dataset

Ask the developer to demonstrate expected results using known test jobs. Check the records behind each card, including after a change, before approving the dashboard.

  • Put several items in one job; verify the chosen counting unit.
  • Create a job before the week and complete it inside the week.
  • Reopen that job; check both historical completions and current open work.
  • Test completion exactly at each reporting boundary in the business time zone.
  • Compare a genuine zero, an empty percentage denominator and a failed refresh.
  • Change language and branch filters; reconcile the displayed totals with the contributing records.

Sources and further reading

← Back to Insights