date-table

Adds a 58-column DimDate table and date-selection measure to PBIP semantic models via TMDL injection.

6|3|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill date-table-insightfulanalytics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: date-table
Source: https://github.com/InsightfulAnalytics/PBI_Agentic_Dev/tree/main/plugins/semantic-models/skills/date-table
Command: npx skills add https://github.com/InsightfulAnalytics/PBI_Agentic_Dev --skill date-table-insightfulanalytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Building a complete date dimension for a Power BI semantic model is repetitive and error-prone: you need calendar, ISO week, fiscal, and to-date columns, correct sort keys, and a title measure that reflects the current date selection. This Skill injects a ready-made DimDate table and the 'Dates Selected' DAX measure directly into a PBIP project's TMDL files, with no Power BI Desktop or network access required. ## Core Features & Use Cases - Extended date dimension injection: Adds a 58-column DimDate table (calendar, ISO week, fiscal, to-date flags) generated by a bundled Power Query M function, with sort-by columns and format strings preset. - Dates Selected measure: Adds a DAX measure that renders the current slicer selection as a readable title such as 'Selected Period: Jan - Mar 2024'. - Configurable calendar parameters: Supports custom date ranges, dynamic end dates, fiscal year start month, week start convention, holiday lists, and mark-as-date-table settings. - Use Case: A BI developer starting a new PBIP project asks the agent to add a date table with a July fiscal year start; the script writes the TMDL files, updates model.tmdl references and query order, and the user only needs to add relationships and refresh in Power BI Desktop. ## Quick Start Ask the agent to add a date table to your PBIP semantic model, specifying the project path, date range, and fiscal year start month.

Frequently Asked Questions about date-table

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a date table to a Power BI PBIP semantic model?▼

Run the add_date_table.py script with the --model flag pointing at your .SemanticModel folder, definition folder, .pbip file, or project root. It writes DimDate.tmdl, the FunctionDateTable M expression, and updates model.tmdl references; use --dry-run first to preview changes.

How do I set a fiscal year start month in a Power BI date table?▼

Pass --fy-start-month with a value from 1 to 12 to the script; the default is 7 (July). Use 1 for a calendar fiscal year, 4 for UK, or 10 for US federal, and the fiscal columns like FYear and FQuarter are generated accordingly.

Does this date table work without Power BI Desktop installed?▼

Yes, the assets are plain TMDL files written directly to the PBIP folder on disk, so no Power BI Desktop, Tabular Editor, or network access is needed. However, Power BI Desktop must not have the project open while the script writes, or it will overwrite the changes.

Why does the Dates Selected measure break with a different date table?▼

The measure is coupled to the bundled DimDate and reads the Date, Year, Start Of Month, Days in Year, and Days In Month columns. If you point it at another date table, you must add those columns first or rewrite the DAX references.

Can the date table extend itself automatically each year?▼

Yes, use the --dynamic-end flag, which ends the table at 31 December of a Year_Variable helper expression (current year plus 2). The script adds the helper expressions and sets the PBI_QueryOrder annotation so Year_Variable refreshes before DimDate.