G

Guide Power Bi Performance

Powerful agent for expert, power, performance, optimization. Includes structured workflows, validation checks, and reusable patterns for expert advisors.

AgentClipticsexpert advisorsv1.0.0MIT
0 views0 copies

Power BI Performance Guide

Your specialized agent for optimizing Power BI performance — covering DAX optimization, data model design, report rendering, and following Microsoft's official performance best practices.

When to Use This Agent

Choose Power BI Performance Guide when:

  • Optimizing slow Power BI reports and dashboards
  • Improving DAX query performance and measure calculations
  • Designing efficient data models (star schema, relationships, cardinality)
  • Troubleshooting Power BI refresh times and gateway performance
  • Implementing best practices for large datasets and DirectQuery

Consider alternatives when:

  • You need general data analytics — use a data analyst agent
  • You need SQL database optimization — use a database specialist agent
  • You need BI strategy (not Power BI specific) — use a BI architect agent

Quick Start

# .claude/agents/power-bi-performance.yml name: Power BI Performance Guide model: claude-sonnet tools: - Read - Write - Edit - Bash - Glob - Grep description: Power BI performance specialist for DAX optimization, data model design, and report rendering efficiency

Example invocation:

claude "Our Power BI report takes 30 seconds to load with 5M rows. Analyze the data model and DAX measures for performance improvements — we're using Import mode with several calculated columns"

Core Concepts

Performance Optimization Layers

LayerImpactOptimization
Data ModelHighestStar schema, proper relationships, remove unused columns
DAX MeasuresHighEfficient formulas, avoid CALCULATE nesting, use variables
VisualsMediumReduce visual count, avoid custom visuals, limit interactions
Data LoadMediumIncremental refresh, query folding, reduce row counts
InfrastructureLow-MediumPremium capacity, gateway tuning, dataset size

DAX Performance Patterns

// SLOW: Iterating with nested CALCULATE Bad_Measure = SUMX( Sales, CALCULATE( SUM(Returns[Amount]), FILTER(Returns, Returns[ProductID] = Sales[ProductID]) ) ) // FAST: Using relationships and variables Good_Measure = VAR _TotalSales = SUM(Sales[Amount]) VAR _TotalReturns = SUM(Returns[Amount]) RETURN _TotalSales - _TotalReturns

Configuration

ParameterDescriptionDefault
connection_modeData connectivity (import, directquery, composite)import
dataset_sizeApproximate dataset sizeprovided per project
premium_capacityPremium/Pro license availablefalse
gatewayOn-premises data gateway in usefalse
optimization_focusPriority (load-time, interaction, refresh, all)all

Best Practices

  1. Design star schema data models. Flat wide tables and snowflake schemas kill Power BI performance. Create a proper star schema with fact tables (numeric, transactional) connected to dimension tables (descriptive, lookup). This is the single most impactful optimization.

  2. Use variables (VAR/RETURN) in all complex DAX measures. Variables are evaluated once and reused, preventing redundant calculations. A measure that references the same sub-expression three times without variables calculates it three times. With VAR, it calculates once.

  3. Remove columns you don't use in reports. Every column consumes memory in Import mode. Remove unused columns at the Power Query level, not with DAX. A table with 50 columns where you use 10 wastes 80% of its memory allocation.

  4. Avoid calculated columns — use measures instead. Calculated columns are computed during refresh and stored in the model, consuming memory. Measures are computed at query time and don't consume storage. Use calculated columns only when you need the value in slicers or filters.

  5. Limit the number of visuals per report page to under 10. Each visual generates a separate query. A page with 20 visuals fires 20 queries simultaneously, competing for resources. Group related information, use bookmarks for alternatives, and use drill-through for detail views.

Common Issues

Report loads fast with 100K rows but crawls at 5M rows. The data model and DAX may contain patterns that scale poorly (row-level iteration, high-cardinality columns in relationships). Switch from calculated columns to measures, reduce dimension cardinality, and verify query folding is occurring in Power Query.

DAX measure works correctly but is extremely slow. Complex CALCULATE/FILTER nesting, SUMX over large tables, and unnecessary context transitions cause slow DAX. Use DAX Studio's Server Timings to identify which measure consumes the most time, then refactor using variables and simpler patterns.

Scheduled refresh times out or runs too long. Large datasets with full refresh each time cause timeouts. Implement incremental refresh (only refresh recent data), optimize Power Query to fold queries back to the source, and ensure the data gateway has sufficient resources.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates