Skip to content
Back to skills

Powerbi Model

ASecurity

Inspect and modify the connected Power BI Desktop semantic model using powerbi-agent — list tables, measures, relationships, and add new measures. Invoke when the user asks about the data model, wants a measure list, needs to add a measure, or is exploring table structure and relationships. Use when the user mentions: Activate when the user wants to inspect tables / measures / relationships, asks "what's in the model", wants to add a measure, or requests an overview of the data model..

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
databashexpress

Works with

  • cli

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add santoshkanthety/powerbi-agent --skill powerbi-model --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Powerbi Model?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Powerbi Model
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/santoshkanthety-powerbi-model/badge)](https://www.skillsdirectory.com/skills/santoshkanthety-powerbi-model)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: powerbi-model
description: Inspect and modify the connected Power BI Desktop semantic model using powerbi-agent — list tables, measures, relationships, and add new measures. Invoke when the user asks about the data model, wants a measure list, needs to add a measure, or is exploring table structure and relationships. Use when the user mentions: Activate when the user wants to inspect tables / measures / relationships, asks "what's in the model", wants to add a measure, or requests an overview of the data model..
license: MIT
---

# Skill: Inspect and Modify the Semantic Model

## Trigger
Activate when the user wants to inspect tables / measures / relationships, asks "what's in the model", wants to add a measure, or requests an overview of the data model.

## Prerequisites
Requires an active connection — run `pbi-agent connect` first if any command fails with "no connection".

## Commands

```bash
# Model overview (name, tables, measures, relationships counts)
pbi-agent model info

# List all tables
pbi-agent model tables

# List all measures across the model
pbi-agent model measures

# Filter measures to a single table
pbi-agent model measures --table Sales

# List relationships
pbi-agent model relationships

# Add a new measure (replaces if the name exists)
pbi-agent model add-measure "Total Sales" "SUM(Sales[Amount])" --table Sales

# Add a measure with a format string
pbi-agent model add-measure "YoY Growth" "[Total Sales] / [PY Sales] - 1" \
    --table Sales --format-string "0.0%"

# Pin an SSAS port (skip auto-detect)
pbi-agent model info --port 56123
```

## Guidance
- `add-measure` **overwrites** an existing measure with the same name — confirm with the user before replacing.
- Table names are case-sensitive; verify with `pbi-agent model tables` before `--table` references.
- For complex DAX with VAR/RETURN, validate via `pbi-agent dax validate` before calling `add-measure`.
- To inspect a single measure's DAX expression, use `pbi-agent dax query "EVALUATE FILTER(INFO.MEASURES(), [Name] = \"My Measure\")"`.

## Measure Create Syntax Reference

Two CLIs can add measures; their argument forms are different:

```bash
# pbi-agent (this tool) — positional name, then DAX, then --table flag
pbi-agent model add-measure "Total Revenue" "SUM(Sales[Amount])" --table Sales

# pbi-cli (if installed separately) — name positional, -e for expression, -t for table
pbi measure create "Total Revenue" -e "SUM(Sales[Amount])" -t Sales
```

The three-positional form `pbi measure create TableName "Name" "DAX"` is **wrong** for pbi-cli — Click rejects it. Always use `-e`/`-t` named flags with `pbi measure create`.

A measure must exist in the model before any report-layer tool can bind a visual to it — `pbi visual bind` and `pbir` both write a *reference*, not a definition. Create the measure first, then bind. See `powerbi-pbi-cli` for how the kind (Column vs Measure) and the implicit aggregation are resolved.

## Common Failures
- **"No active connection"** → run `pbi-agent connect`
- **Table not found** → verify with `pbi-agent model tables` (exact case)
- **Measure expression invalid** → validate first: `pbi-agent dax validate "<expr>"`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…