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. Clone or fork the GitHub repository
  2. Replace the CSVs with your own data following the provided semantic contracts
  3. 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 plan-db-local

  # Create a remote database and load sample data
  uv run plan-db-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 period
# 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