Plan vs Actuals

A production-ready financial blueprint demonstrating Plan vs Actuals variance analysis using Omora Labs components.

Overview

This blueprint demonstrates a production-grade Plan vs Actuals variance analysis built using Omora Labs components. It shows how semantic layers, facts, and dbt transformations compose into a reusable financial reporting pipeline with hierarchical P&L rollups and variance metrics.

Assets

Live Report

Dependencies

How to Use

  1. Run the following command from your terminal or clone or fork the GitHub repository.
npx omoralabs@latest add plan_vs_actuals
  1. Replace the CSVs with your own data.
  2. Create a local or remote database and load sample data:

The remote database service is provided by Motherduck, a remote service for DuckDB databases. You must have an account to complete the remote setup. Motherduck provides a generours free tier.

# Create a local database and load sample data
  uv run omora-local

  # Create a remote database and load sample data
  uv run omora-remote
  1. Run dbt to materialize the analytics models:
cd src/plan_vs_actuals/plan_vs_actuals_dbt
uv run dbt run
  1. Connect to your favorite BI tool directly to the analytics layer. Example consumption on BI Tool:
SELECT * from "plan_vs_actuals"."analytics"."pnl_pivot"
ORDER BY date
# Title adjustments
df = sql_plan_and_actuals
df['display_name'] = df['gl_account'].str.replace('_', ' ').str.replace('pct', '%').str.title()
df['display_name'] = df['display_name'].str.replace('Csm', 'CSM')
df['display_name'] = df['display_name'].str.replace('Csm ', 'CSM ')
df['display_name'] = df['display_name'].str.replace('Cogs', 'COGS ')
df['display_name'] = df['display_name'].str.replace('Ebitda', 'EBITDA')

On this page

Star us on GitHub

If you enjoy this content and find it useful, give us a star on GitHub to show your support and stay updated with our latest improvements.