plugins/powerbi-master/skills/performance-optimization/SKILL.md
Power BI performance optimization for slow reports, models, and queries. PROACTIVELY activate for: (1) report is slow or visuals take forever to load, (2) DAX Studio and VertiPaq Analyzer profiling, (3) Performance Analyzer in Power BI Desktop, (4) optimizing slow DAX measures, (5) slow visuals diagnosis, (6) aggregations and composite-model tuning, (7) query reduction techniques (visual settings, top N), (8) model size reduction (cardinality, calculated columns, summary tables), (9) VertiPaq compression tuning, (10) Direct Lake performance and fallback rules, (11) large-dataset (10GB+) optimization. Provides: profiling workflow with DAX Studio, VertiPaq compression checklist, aggregation-table patterns, model-size reduction techniques, and end-to-end performance investigation playbook.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace performance-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Power BI performance depends on data model design, DAX efficiency, visual configuration, and infrastructure. This skill covers diagnostic tools, optimization techniques, and best practices for achieving fast, responsive reports.
Enable in Power BI Desktop: View > Performance Analyzer > Start recording
| Metric | Meaning | Action if Slow | |--------|---------|----------------| | DAX query | Time to execute the DAX | Optimize measure, check filter context | | Visual display | Time to render the result | Reduce data points, simplify visual | | Other | Miscellaneous overhead | Usually minor, ignore unless dominant |
Workflow:
Free external tool for deep DAX performance analysis:
Key features:
Server Timings breakdown:
| Engine | What It Does | Optimization Target | |--------|-------------|---------------------| | Storage Engine (SE) | Scans VertiPaq data, retrieves rows | Reduce cardinality, columns scanned | | Formula Engine (FE) | Evaluates DAX formulas | Simplify DAX, avoid nested iterators |
Ideal ratio: SE should be 80-90% of total time. High FE % means DAX is doing too much computation.
Common DAX Studio workflow:
Analyze model size and compression in DAX Studio: Advanced > View Metrics
| Metric | What to Check | Target | |--------|--------------|--------| | Table size (bytes) | Identify largest tables | Reduce columns, remove unused | | Column cardinality | High cardinality = poor compression | Reduce distinct values, group rare values | | Column size | Disproportionately large columns | Remove or move to dimension | | Dictionary size | Large string dictionaries | Shorten strings, use keys | | Relationship size | Memory for relationship mapping | Normal, cannot optimize directly | | Hierarchy size | Hidden auto date/time hierarchies | Disable auto date/time |
| Technique | Impact | How | |-----------|--------|-----| | Remove unused columns | High | Delete columns not used in any visual, measure, or relationship | | Reduce column cardinality | High | Group rare values (bottom 5% into "Other") | | Use integer keys | High | Replace text foreign keys with integer surrogates | | Split date/time | Medium | Separate DateTime into Date (date) and Time (time) columns | | Round decimals | Medium | Round to 2 decimal places instead of 15 | | Avoid calculated columns | Medium | Use measures instead (query-time vs storage) | | Disable auto date/time | Medium | Options > Data Load > uncheck | | Remove text from facts | High | Move descriptions to dimension tables |
For large tables, partition by date range:
Use variables to avoid repeated calculations:
// BAD: Calculates [Total Sales] three times
Margin % = DIVIDE([Total Sales] - [Total Cost], [Total Sales])
// GOOD: Single calculation, reuse via variable
Margin % =
VAR Sales = [Total Sales]
VAR Cost = [Total Cost]
RETURN DIVIDE(Sales - Cost, Sales)
Avoid FILTER with large tables in CALCULATE:
// BAD: Scans entire table
CALCULATE([Sales], FILTER(ALL(Products), Products[Category] = "Electronics"))
// GOOD: Column filter (optimized)
CALCULATE([Sales], Products[Category] = "Electronics")
Avoid nested iterators:
// BAD: O(n^2) complexity
SUMX(Products,
SUMX(FILTER(Sales, Sales[ProductID] = Products[ProductID]),
Sales[Amount]))
// GOOD: Use relationship + simple aggregation
SUMX(Products, [Total Sales])
Use DISTINCTCOUNT instead of COUNTROWS(DISTINCT(...)):
// BAD
COUNTROWS(DISTINCT(Sales[CustomerID]))
// GOOD
DISTINCTCOUNT(Sales[CustomerID])
Avoid FORMAT() in measures (returns text, kills sort):
// BAD: Returns text, cannot sort
MonthLabel = FORMAT([Date], "MMMM yyyy")
// GOOD: Use a pre-computed column in the Date table for display
// And a numeric sort column for ordering
| Complexity | Acceptable For | Performance Concern | |-----------|---------------|---------------------| | Simple aggregation (SUM, COUNT) | Any visual | No | | CALCULATE with column filter | Any visual | No | | Single iterator (SUMX) | Most visuals | Watch row count | | CALCULATE with FILTER(table) | Limited visuals | Yes, if table is large | | Nested iterators | Avoid | Yes, always | | CALCULATE inside SUMX | Use carefully | Context transition cost |
| Problem | Impact | Fix | |---------|--------|-----| | 20+ visuals on one page | Each visual sends DAX query | Keep to 8-12 visuals per page | | Visuals with many data points | Large result sets | Use Top N, aggregation | | Many slicers | Each slicer change re-queries all visuals | Use "Apply" button |
Enable query reduction features:
Avoid complex DAX-based conditional formatting on large tables. Use simple column references or measures with limited computation.
Detailed guidance for aggregations, composite models, Direct Lake performance, large dataset optimization (10GB+ semantic models), Power BI Desktop performance settings, Power BI Report Server tuning, and bookmark/filter optimization lives in references/advanced-capacity-patterns.md. Load that reference when tuning enterprise-scale models beyond basic DAX/model/visual improvements.
references/dax-studio-walkthrough.md -- Step-by-step DAX Studio analysis guide with query plan interpretation and latest DAX Studio featuresdevelopment
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.