Power BI Model & DAX Helper: Relationships and Measures

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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)CardinalityFilter direction
    fact_sales[channel_key]dim_channel[channel_key]Many to oneSingle
    fact_sales[customer_key]dim_customer[customer_key]Many to oneSingle
    fact_sales[date_key]dim_date[date_key]Many to oneSingle
    fact_sales[product_key]dim_product[product_key]Many to oneSingle

    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

    1. Transform data: paste each query from power_query.m
    2. Model view: create the relationships above
    3. New table: paste calendar.dax, then Mark as date table
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Write Files
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill transforms messy, wide-format spreadsheets into a clean star schema, automates table relationships, and writes the necessary DAX and Power Query (M) code to make your Power BI reports functional.

    You receive the Power Query M code for data transformation, a library of generated DAX measures for time intelligence, relationship documentation, and a guide for implementing them in Power BI Desktop.

    This skill is designed to work with AI agents that support Python environments; it processes your data structure locally or in a sandbox to generate the modeling code.

    Yes, the skill automatically generates a standard DAX calendar table and ensures all time intelligence measures are mapped to it, following Microsoft’s best practices for date-based calculations.

    While it provides a robust starter kit of YoY, YTD, and moving average measures, you should always validate the final calculations against your source data to ensure specific business logic is reflected.

    The skill focuses on Power BI's native languages (DAX and M), making it compatible with all recent versions of Power BI Desktop and Service.

    New in Agents & Orchestration