← Back to all products

Power BI DAX Pattern Library

$29

100+ DAX patterns for time intelligence, dynamic filtering, ranking, budgets vs actuals, and advanced calculations.

📁 18 files
MarkdownPower BI

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 18 files

power-bi-dax-patterns/ ├── INDEX.md ├── LICENSE ├── README.md ├── advanced/ │ └── advanced-calculations.dax ├── budget-vs-actuals/ │ └── budget-variance-patterns.dax ├── filtering/ │ └── dynamic-filtering-patterns.dax ├── free-sample.zip ├── guide/ │ └── dax-best-practices.md ├── guides/ │ └── dax-best-practices.md ├── index.html ├── parent-child/ │ └── parent-child-patterns.dax ├── ranking/ │ └── ranking-patterns.dax ├── running-totals/ │ └── running-total-patterns.dax ├── semi-additive/ │ └── semi-additive-patterns.dax ├── statistical/ │ └── statistical-patterns.dax ├── table-manipulation/ │ └── table-manipulation-patterns.dax ├── text-and-format/ │ └── text-format-patterns.dax └── time-intelligence/ └── time-intelligence-patterns.dax

📖 Documentation Preview README excerpt

Power BI DAX Patterns Library

100+ production-ready DAX patterns organized by category. Each pattern includes the complete DAX formula, an explanation of how it works, and guidance on when to use it.

What's Included

  • Time Intelligence (15 patterns) — YTD, QTD, MTD, prior periods, rolling windows, fiscal calendars
  • Dynamic Filtering (12 patterns) — Slicers, what-if parameters, dynamic Top N, segmentation
  • Ranking (10 patterns) — Top/Bottom N, percentiles, dense ranks, running ranks
  • Budget vs Actuals (10 patterns) — Variance analysis, forecast accuracy, target tracking
  • Running Totals (8 patterns) — Cumulative sums, running averages, progressive calculations
  • Semi-Additive Measures (8 patterns) — Balance-at-date, inventory, headcount, snapshots
  • Parent-Child Hierarchies (8 patterns) — Org charts, category trees, path functions
  • Advanced Calculations (15 patterns) — ABC analysis, basket analysis, cohort retention, statistical
  • Statistical (8 patterns) — Standard deviation, correlation, regression, outlier detection
  • Text & Formatting (6 patterns) — Dynamic titles, conditional formatting, number formatting
  • Table Manipulation (6 patterns) — Virtual tables, SUMMARIZE, ADDCOLUMNS, GENERATE

How to Use

1. Find the pattern that matches your business requirement

2. Copy the DAX formula

3. Replace table and column names with your model's names

4. Test with a known data subset to verify correctness

Requirements

  • Power BI Desktop (any recent version)
  • A proper date table with MARK AS DATE TABLE applied
  • Star schema data model (fact + dimension tables)

File Format

Each .dax file contains multiple related patterns. Each pattern follows this format:


-- ═══════════════════════════════════════════
-- Pattern: [Name]
-- Category: [Category]
-- When to use: [Scenario description]
-- ═══════════════════════════════════════════
[Measure Name] =
[DAX Formula]

/* HOW IT WORKS:
   [Step-by-step explanation]
*/

License

MIT License — See LICENSE file.

Part of [Data Analyst Toolkit](https://datanest-stores.pages.dev/data-analyst/)

📄 Content Sample guides/dax-best-practices.md

DAX Best Practices Guide

Field-tested rules for writing maintainable, performant DAX measures.


Measure Organization

Naming Convention

TypePatternExample
Base measureTotal {Noun}Total Revenue, Total Orders
Rate/Percentage{Noun} % or {Noun} RateConversion Rate, Margin %
Comparison{Metric} {Period}Revenue Prior Year, Revenue YTD
Growth{Metric} {Period} GrowthRevenue YoY Growth
Conditional{Metric} ({Condition})Revenue (New Customers)
Helper/HiddenPrefix with __Filtered Revenue Base

Display Folders

Organize measures into folders in the model:


Revenue/
├── Total Revenue
├── Revenue YTD
├── Revenue MTD
├── Revenue Prior Year
└── Revenue YoY Growth

Customers/
├── Unique Customers
├── New Customers
├── Returning Customers
└── Customer Retention Rate

Targets/
├── Budget Amount
├── Variance to Budget
├── Budget Attainment %
└── Budget Status

Performance Rules

1. Variables Prevent Repeated Calculation


-- BAD: Calculates [Total Revenue] twice

*... and much more in the full download.*
Buy Now — $29 Back to Products