pbi-chatlisted
Install: claude install-skill starmynd-org/powerbi-to-ai-visuals
# Talk to the model
`tools/pbi_chat.py` is the whole interface. There is no language model inside
it: you are the language model, and it gives you a safe way to reach the data.
Every path is read-only.
## Start by looking
```bash
python3 tools/pbi_chat.py schema # tables, columns, hierarchies, relationships
python3 tools/pbi_chat.py measures # each DAX measure and its SQL, or why there is none
python3 tools/pbi_chat.py roles # revenue / cost / date / channel columns, if analysed
python3 tools/pbi_chat.py distinct "Sales Order.Channel"
```
## Then ask
```bash
python3 tools/pbi_chat.py query \
--dims "Product.Category,Reseller.Business Type" \
--measures "Sum(Sales.Sales Amount)" \
--filters "Date.Fiscal Year in FY2019" \
--filters "Reseller.Business Type not in [Not Applicable]" \
--show-sql --format md
```
`query` resolves joins from the model's relationships, so ask for fields and
let it find the path. Field references:
- `Table.Column`
- `Table.Hierarchy.Level` - e.g. `Date.Fiscal.Month`
- `Agg(Table.Column)` - `Sum`, `Avg`, `Min`, `Max`, `Count`, `DistinctCount`
- a measure by name - e.g. `Sales.Sales Amount by Due Date`
Anything the semantic layer cannot express goes through raw SQL, which is
capped and rejects everything but `SELECT` / `WITH` / `DESCRIBE` / `SHOW`:
```bash
python3 tools/pbi_chat.py sql "SELECT ... FROM Sales JOIN Date ON ..." --format md
```
## Answering well
**Reconcile before you explain.** If the user has a num