A curated collection of reusable DAX measures, calculation patterns, and helper logic for Power BI projects.
This repository is designed to centralize common analytical logic used across dashboards, helping reduce duplication, improve consistency, and speed up Power BI development.
In Power BI projects, the same DAX logic is often rewritten across different models and reports. This library serves as a reusable reference for common analytical patterns that can be adapted and applied across projects.
The goal is to:
- Reduce repetitive DAX writing
- Improve readability and consistency
- Support scalable and maintainable Power BI models
- Time intelligence (YTD, MTD, rolling periods)
- Color formatting
- Number formatting
- Percentage and variance measures
- SVGs
- Context-aware calculations
- Clear measure naming
- Performance-conscious patterns
- Readable and maintainable DAX
You can:
- Copy UDF directly into your model
- Adapt patterns to fit your schema
- Use the repository as a reference during development
Click the thumbnail above to watch a demo of User-Defined Functions in Power BI.
- These patterns are generic by design — always adapt them to your data model.
- Performance may vary depending on relationships, cardinality, and model size.
- Always test measures in your own environment.
- DAX Best Practices: User-Defined Functions (Microsoft Learn)
Maintained by Sajjad Ahmadi
Power BI & Data Visualization Consultant
