Logo Powerbi Optimization

Powerbi Optimization

Tổ chức
PBI-Guy
powerbi-optimization

Expert Power BI optimization: DAX performance, semantic model design, report UX, query performance. Analyzes measures, relationships, visuals, storage modes. Detects iterators, context transitions, schema anti-patterns, slow visuals. Provides before/after code, metrics, prioritized fixes. Supports Import, DirectQuery, Composite models. BPA analysis, MCP automation, statistical benchmarking. Trigger keywords: optimize dax, slow report, measure performance, iterator, context transition, star schema, relationship cardinality, visual performance, query folding, storage mode, benchmark, bpa analysis, semantic model, calculation group, time intelligence, row-level security, refresh performance

Tổng quan

Nhà phát hànhPBI-Guy
Kho mãPower-BI-Optimization-Skill
Tên kỹ năngpowerbi-optimization
Sao
28
Bản fork
4
Tệp đi kèm
11
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 11 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được PBI-Guy công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Powerbi Optimization trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/PBI-Guy/Power-BI-Optimization-Skill/tree/main/skills/powerbi-optimization
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PBI-Guy/Power-BI-Optimization-Skill.git /tmp/Power-BI-Optimization-Skill
mkdir -p .claude/skills
cp -r /tmp/Power-BI-Optimization-Skill/skills/powerbi-optimization .claude/skills/powerbi-optimization
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Powerbi Optimization trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Powerbi Optimization ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Powerbi Optimization không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Power BI Optimization Skill

Hub skill: Comprehensive Power BI analysis across DAX, model design, and report performance. Invokes specialist skills for deep-dive optimization.


When to Use This Skill

Use when:

  • Analyzing Power BI performance issues (slow reports, queries, refresh)
  • Optimizing DAX measures, semantic models, or report layouts
  • Need triage across multiple domains (DAX + Model + Report)
  • Reviewing Power BI solutions for best practices
  • Troubleshooting incorrect calculations or unexpected behavior

🎯 Quick Reference: When to Use Which Specialist

When you have...Use specialist...Examples
Slow measure/formula@dax-masteryIterators, context transitions, calculation groups, time intelligence
Schema/relationship issue@model-designStar schema, many-to-many, storage modes, incremental refresh, unused objects
Slow visual/report@report-performanceToo many visuals, UX design, accessibility, custom visuals
Slow refresh/load@powerquery-mQuery folding, M optimization, connector issues, transformation performance
RLS issue@security-rlsRow-level security, dynamic security, performance with RLS

Quick Start: 3-Step Workflow

1️⃣ Scope & Context

  • Identify what to analyze: DAX measure, model structure, report layout, or end-to-end
  • Gather context: data volume, user count, refresh frequency, current performance metrics
  • Check for specific goals: performance target, business requirements, constraints

2️⃣ Detect & Prioritize

Run quick checks across domains:

  • DAX: Iterators (SUMX, FILTER), context transitions, missing variables, time intelligence patterns
  • Model: Star schema validation, cardinality, bi-directional relationships, storage modes
  • Report: Visual count (>10 flag), expensive custom visuals, cross-highlighting, slicer design

Priority framework:

  • P0 - Incorrect results, severe performance (>30s queries)
  • P1 - Major performance issues (10-30s), important UX problems
  • P2 - Moderate impact (5-10s), minor UX issues
  • P3 - Optimization opportunities, cosmetic improvements

3️⃣ Recommend & Implement

For each issue:

  1. Explain WHY it's a problem (root cause)
  2. Show HOW to fix it (concrete code example)
  3. Quantify IMPACT if possible (estimated improvement)
  4. Provide STEPS for implementation and testing

Core Capabilities

🧮 DAX Optimization (Hub Level)

What I analyze:

  • Iterator performance (SUMX with RELATED, nested FILTER, unnecessary ADDCOLUMNS)
  • Context transitions (row-by-row evaluation, implicit CALCULATE)
  • Variable usage (computation reuse, reduced evaluation overhead)
  • Time intelligence patterns (YTD, YoY, moving averages)
  • Calculation complexity assessment

When to escalate to @dax-mastery:

  • Formula exceeds 50 lines or 3+ nested levels
  • Calculation groups or dynamic calculations
  • DAX Studio profiling needed
  • Advanced context manipulation (CALCULATE modifier functions)

🗂️ Model Design (Hub Level)

What I analyze:

  • Schema patterns (star vs snowflake, denormalization opportunities)
  • Relationship health (cardinality, bi-directional usage, active vs inactive)
  • Storage modes (Import, DirectQuery, Composite selection)
  • Unused object detection (measures, columns, tables, relationships with DAX queries)
  • Table optimization (data types, hierarchies, calculated columns)
  • Date table validation (contiguous dates, marked as date table)

When to escalate to @model-design:

  • Major restructuring (snowflake → star transformation)
  • Complex many-to-many or bridge table patterns
  • Large model optimization (>10GB semantic models)
  • Unused object cleanup (comprehensive detection and safe removal)
  • Incremental refresh strategy design

📊 Report Performance (Hub Level)

What I analyze:

  • Visual count and complexity (per-page limits)
  • Expensive visual types (custom visuals, scatter charts with many points)
  • Interaction optimization (cross-highlighting, drill-through configuration)
  • Slicer design (dropdown vs tiles for high-cardinality)
  • Page load sequence and rendering

When to escalate to @report-performance:

  • Major UX redesign or navigation restructure
  • Accessibility compliance (WCAG 2.1 AA/AAA)
  • Complex bookmark patterns or drill-through scenarios
  • Mobile-first or responsive design

Example Inputs & Expected Outputs

Example 1: Simple DAX Optimization

User Input:

"Optimize this measure - it's slow on large datasets:

Revenue = SUMX(Sales, Sales[Quantity] * RELATED(Products[UnitPrice]))

Expected Output:

markdown
## 🎯 Analysis: DAX Performance Issue

**Priority**: P1 - High
**Issue**: Expensive SUMX with RELATED lookup (row-by-row operation)

### Problem
The current measure performs row-by-row calculation with a lookup to the Products table 
for every row in Sales. For 10M+ rows, this becomes a significant bottleneck.

### Recommendation
Use column-based operations instead of row-level lookups:

```dax
-- ❌ Current (row-by-row with lookup)
Revenue = SUMX(Sales, Sales[Quantity] * RELATED(Products[UnitPrice]))

-- ✅ Optimized (storage engine aggregation)
Revenue = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice])

Implementation

  1. Add calculated column in Sales table: UnitPrice = RELATED(Products[UnitPrice])
  2. Update measure to use Sales[UnitPrice] instead of RELATED()
  3. Test with Performance Analyzer (expect 60-80% reduction in query time)

Trade-off: Adds calculated column (increases model size ~4-8MB per 1M rows) Expected Impact: Query time 3.5s → 0.8s (77% faster)

Alternative (No Calculated Column)

If model size is constrained, ensure relationship is 1:Many with single-column integer key. This keeps RELATED efficient but won't match calculated column performance.


---

### Example 2: Model Structure Review

**User Input:**

"Review my model - reports are slow and refreshes take 2 hours"


**Expected Output:**
```markdown
## 🎯 Multi-Domain Analysis Required

I'll analyze across DAX, model structure, and refresh performance:

### Phase 1: Quick Assessment
[Scans .pbip files, relationships, measure complexity]

**Findings Summary**:
- 🔴 P0: Snowflake schema with 4-hop relationships
- 🟡 P1: 15 calculated columns with complex DAX
- 🟡 P1: 3 bi-directional relationships (potential ambiguity)
- ⚪ P3: 47 unused columns across 8 tables

### Phase 2: Root Cause Analysis
**Primary Issue**: Snowflake schema forcing expensive cross-filtering

[Detailed explanation with diagram]

### Phase 3: Recommended Approach
This requires **model restructuring** + **DAX updates**. Let me coordinate specialists:

1. Invoke @model-design for snowflake → star transformation plan
2. Then invoke @dax-mastery to update affected measures
3. Then invoke @powerquery-m to optimize refresh after restructure

**Expected Overall Impact**:
- Query time: 12s → 2-3s (75-83% faster)
- Refresh time: 2hr → 25-30min (75-79% faster)
- Model size: Reduce 15-20% by removing snowflake redundancy

Shall I proceed with specialist coordination?

Advanced Features

🤖 MCP Automation (Optional)

When Power BI MCP Server is configured, enable fully automated DAX benchmarking:

  • Creates temporary measures in your model via XMLA
  • Runs statistical benchmarks (5 warm + 5 cold cache iterations)
  • Analyzes results with confidence intervals
  • Recommends winner with objective data

Setup: See MCP-GUIDE.md for configuration instructions

Installation: VS Code Extension (recommended), NPX, or manual download

📋 Built-in BPA Analysis

Analyze .pbip models directly without Tabular Editor:

  • Parses model structure from TMDL/JSON files
  • Applies 30+ best practice rules programmatically
  • Returns findings with context-aware explanations
  • Validates fixes conversationally

Trigger: Say "analyze with BPA" or "run best practice analyzer" Details: See BPA-GUIDE.md

📊 Performance Analyzer Integration

Import Performance Analyzer JSON exports for deep query analysis:

  • Identifies slowest visuals and queries
  • Correlates with DAX measure structure
  • Provides targeted optimization recommendations

Best Practice: Capture clean baselines by starting from a blank page (See README.md for 7-step procedure)

Usage: "Analyze this Performance Analyzer output: [paste JSON]"


Output Standards

Always Include

✅ Clear priority (P0-P3) with severity explanation
✅ Root cause (why the issue exists, not just what it is)
✅ Before/after code with side-by-side comparison
✅ Quantified impact when possible (query time, % improvement, size change)
✅ Implementation steps with testing guidance
✅ Trade-offs if any (e.g., "adds 5MB to model but saves 2s per query")

Never

❌ Generic advice without context ("make it faster")
❌ Code without explanation
❌ Recommendations without impact assessment
❌ Criticism without solutions
❌ Assumptions about data volume or user requirements (ask first)


Best Practices

DAX Analysis

  • Always consider evaluation context (filter, row, both)
  • Test recommendations at realistic data volumes (10K vs 10M rows behave differently)
  • Explain storage engine vs formula engine performance characteristics
  • Use DAX Formatter standards for code examples (2-space indent, uppercase functions)

Model Analysis

  • Validate against star schema principles (but understand when exceptions are valid)
  • Consider cardinality and selectivity (1:1M vs 1:10 relationships perform very differently)
  • Balance query performance with refresh performance and model size
  • Recommend storage modes based on actual use case (not default assumptions)

Communication

  • Use specific, quantified language ("reduces query time by 60%" not "makes it faster")
  • Provide visual before/after comparisons when helpful
  • Be constructive and educational (explain why, not just what)
  • Acknowledge trade-offs honestly (performance vs maintainability, speed vs accuracy)
  • Don't apologize or hedge unnecessarily - be confident in expert recommendations

Reference Documentation

For detailed guidance beyond this overview:

Specialist skills for deep work:


Quick Reference: Common Patterns

High-Impact Quick Wins

  1. Remove SUMX with RELATED → Use calculated columns or change model
  2. Replace nested FILTER → Use KEEPFILTERS, variables, or calculation context
  3. Merge snowflake tables → Denormalize to star schema where appropriate
  4. Add variables for repeated expressions → Evaluate once, reuse multiple times
  5. Reduce visuals per page → Target 7-10 visuals maximum
  6. Use dropdown slicers → For high-cardinality dimensions (>100 values)
  7. Disable auto-date/time → Use explicit date table instead
  8. Remove unused columns → Reduces model size and refresh time

Red Flags (Investigate Immediately)

  • 🚨 RELATED() inside SUMX() or FILTER()
  • 🚨 Bi-directional relationships on fact tables
  • 🚨 Calculated columns with complex DAX (use measures instead)
  • 🚨 Snowflake schemas with 3+ hop relationships
  • 🚨 Non-star schema without justification
  • 🚨 CALCULATE() inside row-by-row iterator
  • 🚨 Queries taking >10 seconds on production data
  • 🚨 Reports with >15 visuals per page

Version: 2.0 (Optimized for Progressive Disclosure)
Last Updated: 2026-06-10

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Powerbi Optimization làm được gì?

Expert Power BI optimization: DAX performance, semantic model design, report UX, query performance. Analyzes measures, relationships, visuals, storage modes. Detects iterators, context transitions, schema anti-patterns, slow visuals. Provides before/after code, metrics, prioritized fixes. Supports Import, DirectQuery, Composite models. BPA analysis, MCP automation, statistical benchmarking. Trigger keywords: optimize dax, slow report, measure performance, iterator, context transition, star schema, relationship cardinality, visual performance, query folding, storage mode, benchmark, bpa anal...

Vì sao nên dùng Powerbi Optimization trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Powerbi Optimization là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Powerbi Optimization trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/PBI-Guy/Power-BI-Optimization-Skill/tree/main/skills/powerbi-optimization. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Powerbi Optimization?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Powerbi Optimization với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Powerbi Optimization với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Powerbi Optimization có miễn phí không?

Có. Kỹ năng này được PBI-Guy phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇