pbi_generate_dax_context_prompt
Generate a compact markdown snapshot of your Power BI model—tables, columns, measures, relationships—to give an LLM full schema context for authoring DAX in one round-trip.
Instructions
Render a compact markdown snapshot of the model — tables, columns, measures, relationships — ready to paste into an LLM system prompt so the LLM can author DAX with full schema context in one round-trip.
Sections:
# Model: <name>one
## <Table>per table withColumns:and (optionally) DAXMeasures:lines## RelationshipswithA[X] → B[Y] (cardinality, active)rows
Output is truncated to max_chars (default 12 000) with a trailing
note when truncation kicks in. Set include_dax=False to omit the
measure expressions and stay terse.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_chars | No | ||
| include_dax | No | ||
| include_hidden | No | ||
| include_relationships | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |