Business Intelligence, Reporting, and Dashboards Questions
The reporting and presentation layer of analytics: semantic/metrics layers, report development and automation, self-service BI, and the architecture that feeds dashboards and reports. Covers dashboard and visualization design (tool selection across Tableau/Power BI/Looker-style platforms, drill-downs, information architecture, communicating metrics visually), refresh strategies, and query performance for interactive reporting workloads. Spans both the engineering behind the reporting layer and the design of the dashboards that consume it.
Write pseudocode or a short Python outline for a daily automated reconciliation job that compares a source table's totals against an aggregated reporting table for the same date, and alerts if they differ by more than a small tolerance (say 0.5%). Cover scheduling, idempotency (what happens if the job runs twice for the same day), logging, and how you'd notify the right people.
Sample Answer
Direct answer
A daily reconciliation job that compares a source table's totals against an aggregated reporting table and alerts on drift needs to be idempotent (safe to re-run for the same day without double-alerting), log what it found, and clearly separate the comparison logic (easy to test) from the notification logic (where retries and duplicate-suppression matter).
Structured elaboration
Scheduling: run once per day after the source data for that day is expected to be complete (not too early, or you'll compare against a partially-loaded source and get a false alert every day).
Idempotency: if the job runs twice for the same day, whether due to a manual re-trigger or an orchestrator retry, it should compute the same result and, critically, not send a duplicate alert for a breach it already reported. This means tracking which dates have already been alerted, not just re-running the comparison blindly.
Logging: every run should log the computed totals and the diff percentage, whether or not it breached, so there's a historical record for later investigation, not just alerts for the failures.
Notification best practices: alert with enough context to act on immediately (which date, what the source total was, what the reporting total was, how far outside tolerance), routed to whoever actually owns investigating a discrepancy.
Worked example
Below is a working Python implementation (executed, not just described) that separates the pure comparison logic from the idempotent alerting wrapper:
from dataclasses import dataclass
from datetime import date
import logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
log = logging.getLogger("reconciliation")
TOLERANCE_PCT = 0.5
@dataclass
class ReconciliationResult:
run_date: date
source_total: float
reporting_total: float
diff_pct: float
breached: bool
def reconcile_day(run_date, source_rows, reporting_rows) -> ReconciliationResult:
source_total = sum(amt for d, amt in source_rows if d == run_date)
reporting_total = sum(amt for d, amt in reporting_rows if d == run_date)
diff_pct = 0.0 if source_total == 0 and reporting_total == 0 else (
float("inf") if source_total == 0 else abs(source_total - reporting_total) / abs(source_total) * 100.0
)
breached = diff_pct > TOLERANCE_PCT
log.info("run_date=%s source=%.2f reporting=%.2f diff=%.4f%% breached=%s",
run_date, source_total, reporting_total, diff_pct, breached)
return ReconciliationResult(run_date, source_total, reporting_total, diff_pct, breached)
def run_idempotently(run_date, source_rows, reporting_rows, already_alerted: set) -> ReconciliationResult:
result = reconcile_day(run_date, source_rows, reporting_rows)
if result.breached and run_date not in already_alerted:
log.warning("ALERT: %s breached tolerance (%.4f%% > %.1f%%)", run_date, result.diff_pct, TOLERANCE_PCT)
already_alerted.add(run_date)
elif result.breached:
log.info("Breach already alerted for %s, suppressing duplicate.", run_date)
return result
Executed against two cases for 2026-01-09, holding the reporting table's total fixed at $140.02 across both cases so they're genuinely comparable: (1) source rows [40.0, 60.0, 40.05] (true total $140.05) against the $140.02 reporting total, a rounding-level difference, gives diff_pct = 0.0214%, well under the 0.5% tolerance, correctly NOT breached. (2) the same source rows plus a $500 late-arriving order the reporting table hadn't yet picked up (true source total $640.05) against that same $140.02 reporting total gives diff_pct = 78.1236%, correctly breached. Running run_idempotently twice in a row for case 2 confirms the alert fires exactly once on the first call and is explicitly suppressed with a logged "already alerted" message on the second, verifying the idempotency guard actually works rather than just being asserted in a docstring.
Trade-offs and pitfalls
A 0.5% tolerance is a specific business decision, not a technical default, and needs to be calibrated per metric: too tight, and normal rounding or timing noise between the source and the aggregate constantly trips false alerts (as seen in case 1's 0.0214% legitimately passing); too loose, and a real, material discrepancy (like case 2's missing $500 order, a 78%+ swing) could slip through if the total volume is large enough to dilute the percentage. The already_alerted set in this example is in-memory and would need to be a persistent store (a database table, not a Python set that resets on every process restart) in a real production job, or the idempotency guarantee only holds within a single run, not across the multiple restarts a real scheduled job experiences over its life.
Define concrete SLOs for a reporting/BI platform, not just 'the data should be fresh and correct.' For each dimension you choose (freshness, correctness, availability, or similar), state what you would actually measure, what threshold makes it pass or fail, and what happens operationally when it's violated.
Sample Answer
Direct answer
Defining real SLOs (service-level objectives) for a reporting platform means going beyond a vague promise like 'the data should be fresh and correct' and committing to specific, measurable objectives for freshness, correctness, and availability, each with a concrete threshold, a way to measure it, and a defined operational response when it's violated.
Structured elaboration
Freshness: how stale is the data allowed to get before it's a problem, measured as the time between when the source data was generated and when it's reflected in the report. Different reports legitimately have different thresholds (an operational dashboard might need freshness under 15 minutes; a historical trend report might be fine with a daily refresh), so this needs to be set per report tier, not globally.
Correctness: what fraction of the time is the data actually right, measured against some ground truth or reconciliation check (a percentage of automated data-quality checks passing, or a reconciliation against a source system within an agreed tolerance).
Availability: what fraction of the time is the report actually accessible and loading successfully when someone tries to view it, similar to an application uptime SLO.
For each SLO: an objective (the target, e.g. 99% of daily refreshes complete within 15 minutes of the scheduled time), a measurement approach (how you actually calculate whether you hit the target, from what instrumentation), an error budget (how much violation is tolerated before it's treated as a real incident, since 100% is rarely realistic or worth the cost of achieving), and an escalation and remediation path (what happens operationally when the error budget gets exhausted: a review, a temporary pause on new feature work in favor of reliability work, a formal incident).
Worked example
A reporting platform sets three SLOs for its tier-1 (executive-facing) dashboards: freshness SLO of 99% of refreshes complete within 15 minutes of the scheduled time, measured by comparing each job's actual completion timestamp against its schedule; correctness SLO of 99.9% of automated reconciliation checks passing (checks comparing a sample of dashboard totals against source-system totals), measured daily; and availability SLO of 99.5% successful page loads, measured via application monitoring on the BI (business intelligence) tool itself. The freshness error budget is 1% of refreshes; for a tier of about 10 to 13 daily-refreshing executive dashboards, that's roughly 300 to 390 refreshes a month, so the budget allows about 3 to 4 of them to run late before it's treated as exhausted (this count has to be derived from the tier's actual refresh volume, not assumed as a fixed figure, since a bigger tier or a faster cadence within it raises the allowed count proportionally); when that budget is exhausted mid-month, the team's policy is that new dashboard feature requests pause and the team focuses on reliability work (fixing whatever's causing the late refreshes) until the SLO is back on track, rather than continuing to add new reports on top of an already-strained pipeline.
Trade-offs and pitfalls
Setting an SLO's threshold too aspirational (99.99% freshness on everything) either requires infrastructure investment disproportionate to the actual business need, or gets quietly ignored the first time it's violated because nobody actually planned for what happens then, both of which defeat the purpose; the threshold should reflect what the business genuinely needs and what the team is actually willing to invest in maintaining, not the most impressive-sounding number. The other common failure is defining an SLO without a real error budget and remediation process behind it: an SLO that's just a number on a dashboard nobody acts on when it's breached is indistinguishable from having no SLO at all, so the escalation and remediation commitment is the part that actually makes the SLO meaningful, not the number itself.
One audience for a metric needs it within seconds or minutes; another needs it slower but guaranteed correct down to the penny (finance closing the books, for example). Design an architecture that serves both from the same underlying data: a fast, provisional view and a slower, authoritative one, including how you distinguish provisional from final in the UI and how the two get reconciled.
Sample Answer
Direct answer
When one audience needs a metric within seconds and another needs it slower but guaranteed correct, the answer is usually not to force one speed on both, but to serve two versions from the same underlying data: a fast, provisional view computed with less certainty, and a slower, authoritative view computed once all the data is truly in, with the two clearly labeled so nobody mistakes one for the other.
Structured elaboration
The provisional/fast path: computes an approximate or early answer from data as it arrives, accepting that late-arriving events (a delayed transaction, a retried request) might not be included yet, and that the number could still change before it's final. This path typically uses stream processing or frequent micro-batches to stay close to real time.
The authoritative/slow path: waits until a defined cutoff (end of day, a fixed processing delay) by which essentially all the relevant data is guaranteed to have arrived, then computes the final number once, which is treated as the number of record for anything that needs to be exactly right (financial reporting, anything audited).
Distinguishing provisional from final in the UI: the fast view needs an explicit, visible label ("provisional, as of [timestamp]") so a viewer doesn't mistake an early, possibly-incomplete number for the final one; without this, the two paths existing side by side actively creates confusion instead of solving the original problem.
Reconciliation: when the authoritative number is finally computed, it should be compared against what the provisional path was showing, both to validate the provisional path is generally trustworthy (are they usually close) and to give a concrete, auditable record of exactly how much a specific provisional figure ended up differing from the final one.
Processing guarantees: the fast path typically accepts an approximate correctness in exchange for speed (an at-least-once processing model that might occasionally double-count something transient, self-correcting on the next update), while the authoritative path needs exactly-once guarantees or an equivalent (idempotent, deduplicated processing) since it's the number that has to be exactly right.
Worked example
Finance needs an accurate revenue number to close the books at end of day; the product team wants to watch revenue trending in near real time throughout the day. The design: a streaming pipeline computes a provisional revenue figure updated every few minutes throughout the day, clearly labeled "Provisional, updated 2 minutes ago" on the product-facing dashboard, built to tolerate a small amount of double-counting from at-least-once delivery since it self-corrects on the next update. At end of day, a separate batch job runs once all transactions for the day are guaranteed to have settled (including any that were delayed or retried), computing the authoritative daily revenue with exactly-once processing guarantees; this becomes the number finance closes the books against and the number any historical dashboard shows for that date going forward. The reconciliation step compares the final provisional figure from just before midnight against the authoritative number computed hours later; a persistent gap larger than expected (say, provisional consistently running 3% low) would be a signal that the provisional path's assumptions need adjusting, not just a curiosity to note.
Trade-offs and pitfalls
The hardest part of this design in practice isn't the technical dual-path architecture, it's making sure the UI labeling actually prevents confusion; if "provisional" is a small gray label easy to miss, someone will eventually screenshot the provisional number into a deck as if it were final, and the entire point of the distinction is lost. The other real cost is maintaining two genuinely different processing pipelines (the fast streaming path and the slow authoritative batch path) rather than one, which is more infrastructure and more to monitor; before committing to this dual-path design, it's worth confirming the fast-path audience genuinely needs sub-minute freshness and would actually act differently with it, rather than just wanting the number sooner because faster feels better, echoing the same 'what decision changes' discipline used to choose report cadence generally.
Before a new dashboard or report ships to the business, what would you check to make sure it is actually trustworthy and maintainable, not just visually finished? Describe a repeatable pre-ship review and, separately, what standards or lifecycle policy you would want in place for dashboards in general, covering ownership, versioning, and when something old gets retired.
Sample Answer
Direct answer
A pre-ship review checks that a dashboard is not just visually finished but actually correct and maintainable: the numbers reconcile against a known source, the visuals aren't misleading, performance is acceptable, and there's an owner on record. Separately, dashboards need a lifecycle policy for their whole life, not just the moment they ship: creation standards, ownership, versioning, and clear criteria for when something old gets retired.
Structured elaboration
Pre-ship checklist, concretely:
- Data checks: spot-check the headline numbers against an independent query or a known-good source; check for unexpected nulls, duplicate rows, or a filter that's silently excluding data.
- Visual checks: axis labels and units are present, color choices don't mislead (a truncated y-axis exaggerating a trend), and the chart type actually fits what's being shown.
- Performance tests: does the dashboard load in an acceptable time under realistic filter combinations, not just the default view.
- Documentation: what does each metric mean, where does the data come from, who do you ask if something looks wrong.
- Sign-off: a named reviewer, not just the author, confirms the checklist before it ships.
Lifecycle policy beyond the ship moment:
- Creation templates: a starting structure so every new dashboard doesn't reinvent conventions from scratch (consistent date filters, consistent metric naming).
- Ownership rules: every dashboard has a named owner responsible for it, not 'whoever built it, who left the company eighteen months ago.'
- Versioning: changes are tracked, not silent overwrites (this connects directly to the versioning discipline).
- Deprecation criteria: a dashboard nobody has opened in six months, or one that's been superseded by a better one, should have a defined path to retirement rather than existing forever as one more thing that might be stale or wrong.
- Monitoring adherence: periodically auditing whether dashboards actually have owners, current documentation, and reasonable freshness, not just checking these boxes once at creation.
Worked example
A new 'Regional Sales Performance' dashboard is ready to ship. The pre-ship review: the reviewer spot-checks total Q3 revenue for one region against a manual warehouse query and confirms it matches to the dollar; checks that the trend chart's y-axis starts at zero (not truncated in a way that exaggerates a small change); confirms the dashboard loads in under 3 seconds with a typical region-and-quarter filter applied; confirms a one-paragraph description exists for each of the five headline metrics; and gets a named sign-off from a second analyst before it's marked live. Six months later, the lifecycle policy's adherence audit flags this dashboard because it hasn't had a documented owner check-in and usage has dropped to near zero, triggering a conversation about whether to retire or refresh it, rather than letting it silently go stale indefinitely.
Trade-offs and pitfalls
A checklist that's too heavy discourages people from following it (or from shipping anything at all), so the real skill is calibrating rigor to the dashboard's blast radius: an executive-facing dashboard that drives real decisions deserves the full checklist and a second reviewer; a personal exploratory dashboard an analyst built for themselves does not need the same ceremony, and treating every dashboard identically either slows the team down or quietly gets skipped for the ones that matter most. Deprecation is also politically harder than it sounds: a dashboard with low measured usage might still be the one thing a specific stakeholder checks once a quarter right before a board meeting, so 'usage looks low, retire it' needs a real notice-and-object period before deletion, not just a usage-threshold automation.
What is a semantic layer in a BI stack, and why do organizations centralize metric logic there instead of letting every dashboard or report define its own calculation? Explain what it typically exposes to consumers, how it connects to the underlying warehouse, and how it helps two different BI tools stay consistent with each other.
Sample Answer
Direct answer
A semantic layer is a translation layer that sits between raw warehouse tables and the tools people use to consume data. It defines metrics, dimensions, hierarchies, and business rules once, in one place, so that a dashboard in one BI (business intelligence) tool and a dashboard in a different BI tool compute 'revenue' or 'active users' the exact same way. Without it, every report author writes their own SQL, and small differences (a different filter, a different join, a different definition of 'active') silently produce different numbers for the same-sounding metric.
Structured elaboration
What it typically exposes to consumers:
- Metrics: named, versioned calculations (e.g.
net_revenue = sum(amount) - sum(refunds)), not raw columns. - Dimensions and hierarchies: the ways a metric can be sliced (region rolling up to country rolling up to sales org), defined once so 'region' means the same thing everywhere.
- Access rules: which rows or columns a given consumer is allowed to see, applied consistently regardless of which tool queries through it.
- Pre-approved custom calculations: a mechanism for an analyst to build something new without duplicating the base metric logic.
How it connects to the warehouse: the semantic layer does not usually store data itself. It holds a model (joins, grain, metric expressions) and compiles a request from a BI tool ("give me net_revenue by region for last quarter") into the actual SQL that runs against the warehouse. The warehouse remains the source of truth for data; the semantic layer is the source of truth for what the data means.
How it keeps two BI tools consistent: both tools query the same semantic layer instead of each maintaining its own copy of the metric logic. If Tableau and Power BI both ask for net_revenue, they get it from the identical compiled definition, not from two independently-written queries that happen to look similar. When the definition changes (say refunds now exclude a new fee type), it changes once and both tools pick it up automatically on their next query, instead of someone having to remember to update two calculated fields in two different tools.
Worked example
Imagine net_revenue is defined once in the semantic layer as: gross order amount, minus refunds, minus disputed chargebacks, at the order-line grain, rolling up through product to product-category to business-unit. An executive dashboard in Power BI asks for net_revenue by business_unit for Q1, and an analyst's ad-hoc exploration in Looker asks for net_revenue by product for the same window. Both queries compile down to the same underlying expression (sum(amount) - sum(refund_amount) - sum(chargeback_amount)), just aggregated to different grains. If someone later discovers refunds should also exclude store-credit reversals, that's one change to the metric definition; both tools reflect it the next time they query, and nobody has to hunt down every dashboard that independently reimplemented 'revenue.'
Trade-offs and pitfalls
A semantic layer is only as trustworthy as its governance: if anyone can add a metric with a name that collides with an existing one, or edit a definition without review, you've just moved the inconsistency problem instead of solving it, which is why most real implementations pair the semantic layer with certified/reviewed definitions and change control. It also adds a layer of indirection: debugging why a number looks wrong now means checking the semantic layer's compiled query, not just the dashboard's visible formula, which can slow down troubleshooting if the team isn't used to it. Finally, a semantic layer that tries to model everything up front becomes a bottleneck; most successful ones start with a small set of high-value, widely-disputed metrics (revenue, active users) and expand rather than modeling the entire warehouse on day one.
Unlock Full Question Bank
Get access to all 46 Business Intelligence, Reporting, and Dashboards interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.