# Application Report: Report Comparison View

A period over period comparison with two period chips, a swap control, a metrics summary line, and a table of current, previous, and change values.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-comparison-view
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [Reports](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports)
- Created: 2026-07-04
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-comparison-view.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-reports-report-comparison-view
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, table
- Installs to: `@/components/blocks/application-pro/reports/report-comparison-view`

## About this block

Report Comparison View sets a current period, Jun 1 to
Jun 30, 2026, against the previous May 1 to May 31 with a
swap control between the two labelled chips and a summary
line counting how many metrics improved. The table below
runs six rows, revenue, new customers, churned customers,
active users, average order value, and trial conversion,
each showing the current value, the previous value, a
signed change figure with an up or down arrow, and paired
mini bars that size the two periods side by side.

Rows are one typed array where an improved flag, rather
than the raw direction, decides whether a change reads as
positive, so a fall in churned customers still counts as
an improvement. The footer note spells that rule out, and
the paired bars give a proportional read of each metric
without pulling in a chart.

## When to use

Reach for this block on a reporting page where two windows
need a direct read against each other, wired to your
metrics API with both period ranges. The swap control
should flip current and previous and recompute every
change figure in place.

A natural flow around it on an Application Pro page:

**Before**

- [Report summary header](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports)
- [Report filters bar](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports)

**After**

- [Data table](https://www.shadcn-ui-blocks.com/blocks/application-pro/data-tables)
- [Charts](https://www.shadcn-ui-blocks.com/blocks/application-pro/charts)

## What you can display

One strong use is month over month business metrics. Other
comparison views:

- **Plan comparison.** Two pricing tiers side by side with
  per metric current values and the gap between them.
- **Team comparison.** Two squads across the same set of
  delivery metrics with paired bars per row.
- **Forecast versus actual.** Planned figures against
  realised ones with the variance in the change column.

> Tip: the improved flag, not the arrow direction, decides
> tone, so a lower churn number can still read as a win.

## More in Application Reports

- [Cohort Retention Grid](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/cohort-retention-grid)
- [Dashboard Grid Layout](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/dashboard-grid-layout)
- [Export Options Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/export-options-card)
- [Metric Detail Drilldown](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/metric-detail-drilldown)
- [Report Annotations Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-annotations-panel)
- [Report Builder](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-builder)
- [Report Filters Bar](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-filters-bar)
- [Report Run History](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-run-history)
- [Report Summary Header](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/report-summary-header)
- [Saved Reports List](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/saved-reports-list)
- [Scheduled Report Form](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/scheduled-report-form)
- [Scheduled Reports Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/reports/scheduled-reports-table)
