Skip to content

Fix missing CapacityReservationId and CapacityReservationStatus columns in Power BI storage templates - #1853

Merged
Michael Flanakin (flanakin) merged 9 commits into
devfrom
copilot/fix-capacity-reservation-id-error
Feb 25, 2026
Merged

Fix missing CapacityReservationId and CapacityReservationStatus columns in Power BI storage templates#1853
Michael Flanakin (flanakin) merged 9 commits into
devfrom
copilot/fix-capacity-reservation-id-error

Conversation

Copilot AI commented Oct 10, 2025

Copy link
Copy Markdown
Contributor
  • Analyzed the issue: Power BI storage templates missing CapacityReservationId and CapacityReservationStatus columns
  • Reviewed documentation: FOCUS 1.2 spec requires these columns based on AdditionalInfo.VMCapacityReservationId
  • Found source data: x_CapacityCommitmentId already extracted from VMCapacityReservationId in ftk_NormalizeSchema.pq
  • Add CapacityReservationId column to ftk_NormalizeSchema.pq (map from x_CapacityCommitmentId)
  • Add CapacityReservationStatus column to ftk_NormalizeSchema.pq (logic: null if no ID, "Unused" if resource type is capacity reservation, otherwise "Used")
  • Add columns to storage Costs.tmdl table definition
  • Update changelog
  • Verify KQL templates already have the columns (confirmed)
  • Validate syntax of changes (confirmed)
  • Address PR feedback: Move changelog entry to Added section and reword
Original prompt

This section details on the original issue you should resolve

<issue_title>CapacityReservationId column does not exist in the rowset</issue_title>
<issue_description>We are currently utilizing the Cost Summary prebuilt Power BI template available from the FinOps Toolkit (https://microsoft.github.io/finops-toolkit/power-bi).

While the dataset refreshes successfully in Power BI Desktop, we encounter the following error when attempting to refresh it in the Power BI Service:

Data source error: The 'CapacityReservationId' column does not exist in the rowset.

We kindly request your support in resolving this issue and addressing the inconsistency observed.

</issue_description>

<agent_instructions>Triage the issue, research using mslearn, provide proposed solutions along with links/citations to authorative sources.</agent_instructions>

Comments on the Issue (you are Copilot in this section)

Fixes #1836


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…wer BI storage templates

Co-authored-by: MSBrett <24294904+MSBrett@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error for missing CapacityReservationId column Fix missing CapacityReservationId and CapacityReservationStatus columns in Power BI storage templates Oct 10, 2025
@iamfirdousfifa

Copy link
Copy Markdown

Hello Team Brett Wilson (@MSBrett) could you please share tentative ETA on the fix

@flanakin Michael Flanakin (flanakin) added this to the v14 milestone Jan 6, 2026
Comment thread docs-mslearn/toolkit/changelog.md Outdated
Co-authored-by: flanakin <399533+flanakin@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for FOCUS 1.2 CapacityReservationId and CapacityReservationStatus columns to storage-based Power BI reports, addressing a data refresh error in the Power BI Service. The columns are derived from existing data (x_CapacityCommitmentId extracted from VMCapacityReservationId in AdditionalInfo).

Key changes:

  • Added Power Query logic to generate CapacityReservationId and CapacityReservationStatus columns
  • Updated Power BI table schema to include the new columns
  • Documented changes in the changelog

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/power-bi/queries/ftk_NormalizeSchema.pq Added CapacityReservationId column (mapping from x_CapacityCommitmentId) and CapacityReservationStatus column (with logic to detect "Unused" vs "Used" status)
src/power-bi/storage/Shared.Dataset/definition/tables/Costs.tmdl Added column definitions for CapacityReservationId and CapacityReservationStatus with metadata
docs-mslearn/toolkit/changelog.md Added changelog entry documenting the new columns, plus additional fix entry

Comment thread src/power-bi/storage/Shared.Dataset/definition/tables/Costs.tmdl Outdated
Comment thread src/power-bi/queries/ftk_NormalizeSchema.pq
Comment thread docs-mslearn/toolkit/changelog.md Outdated
Comment thread docs-mslearn/toolkit/changelog.md Outdated
@flanakin Michael Flanakin (flanakin) modified the milestones: v14, v13 Feb 10, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread docs-mslearn/toolkit/changelog.md Outdated
@flanakin
Michael Flanakin (flanakin) merged commit e88abc5 into dev Feb 25, 2026
4 checks passed
@flanakin
Michael Flanakin (flanakin) deleted the copilot/fix-capacity-reservation-id-error branch February 25, 2026 06:36
Michael Flanakin (flanakin) added a commit that referenced this pull request Mar 10, 2026
…ns in Power BI storage templates (#1853)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MSBrett <24294904+MSBrett@users.noreply.github.com>
Co-authored-by: Michael Flanakin <flanakin@users.noreply.github.com>
Co-authored-by: flanakin <399533+flanakin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Skill: DevOps GitHub setup and automation Skill: Documentation Documentation updates Tool: FinOps guide Implementing FinOps guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CapacityReservationId column does not exist in the rowset

7 participants