- Home
- Skills
- Agents & Orchestration
- Power BI Model & DAX Helper: Relationships and Measures
Power BI Model & DAX Helper: Relationships and Measures
Build a Power BI model kit from a star schema or flat file: relationships, a DAX calendar table, Power Query M queries, and starter DAX measures (YoY, YTD, running total, moving average, ranking).
$9
Works with the AI Agents you already use
Power BI Model & DAX Helper: Relationships and Measures
Example session with this skill installed
I have a star schema folder from my sales data. Build the Power BI model for me: the relationships, a calendar table, the Power Query imports and the main DAX measures.
- Read your context and instructions
- Compiled the power bi model
Summary
Read the star schema folder (fact_sales plus 4 dimensions) and wrote a Power BI kit with
15 DAX measures, 4 relationships, a calendar table, and Power Query import queries.
Relationships
| From (many) | To (one) | Cardinality | Filter direction |
|---|---|---|---|
| fact_sales[channel_key] | dim_channel[channel_key] | Many to one | Single |
| fact_sales[customer_key] | dim_customer[customer_key] | Many to one | Single |
| fact_sales[date_key] | dim_date[date_key] | Many to one | Single |
| fact_sales[product_key] | dim_product[product_key] | Many to one | Single |
Mark dim_date[date] as the date table, and hide the *_key columns in Report view.
Measures (sample)
- Revenue = SUM('fact_sales'[revenue])
- Orders = DISTINCTCOUNT('fact_sales'[order_id])
- Average per Order = DIVIDE([Revenue], [Orders])
- Revenue LY = CALCULATE([Revenue], SAMEPERIODLASTYEAR('dim_date'[date]))
- Revenue YoY % = DIVIDE([Revenue] - [Revenue LY], [Revenue LY])
- Revenue YTD = TOTALYTD([Revenue], 'dim_date'[date])
- Product Rank = RANKX(ALLSELECTED('dim_product'[product]), [Revenue], , DESC, Dense)
Also generated: Row Count, QTD, MTD, Running Total, 3-month Moving Avg, % of Total, Best Month Flag.
How to apply
- Transform data: paste each query from power_query.m
- Model view: create the relationships above
- New table: paste calendar.dax, then Mark as date table
- New measure: paste each measure from measures.dax
Caveat
This DAX is a starting point. Validate each measure against totals you trust before publishing a report.
Connects securely to your tools. The creator never sees your data.
About this skill
Skip the blank-page problem in Power BI
Power BI Model and DAX Helper takes your data and produces the pieces you would otherwise build by hand: the relationships, the calendar table, the import queries and a set of tested-pattern DAX measures. Paste them in, then validate against your own totals.
What you get
- Relationships guide: which table joins to which, on what key, with cardinality and filter direction (one-to-many, single direction), plus the mark-as-date-table step
- DAX measures: total, row count, distinct orders, average per order, last year, YoY and YoY %, YTD, QTD, MTD, running total, 3-month moving average, % of total, product rank, best-month flag
- DAX calendar table ready to paste and mark as the date table
- Power Query M queries to import every table from CSV
- Reshape wide data: unpivots month columns (Jan, Feb, Mar...) into a long table and prints the matching Power Query step
Good defaults, stated clearly
- Dimension-to-fact, single direction, on key columns. Bi-directional filtering is never recommended by default.
- Always uses a dedicated calendar table for time intelligence.
- Measures only reference tables and columns that exist. If something is missing, that measure is skipped and the skill tells you.
- The DAX is a starting point to validate, not a finished report.
Requirements
Python 3.9+ and pip install pandas. No Power BI connection needed: it writes text files you paste into Power BI Desktop.
Works great with
Star Schema Designer (feeds it the star folder) and Retail Data Cleaner (clean first).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires Python for script execution. Generated DAX requires manual verification. Assumes star schema principles for relationship inference.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago