Skip to content

Update Power BI reports to FOCUS 1.4 (v1_4 schema)#2209

Draft
flanakin wants to merge 3 commits into
flanakin/focus14-phase7-tests-changelogfrom
flanakin/focus14-power-bi
Draft

Update Power BI reports to FOCUS 1.4 (v1_4 schema)#2209
flanakin wants to merge 3 commits into
flanakin/focus14-phase7-tests-changelogfrom
flanakin/focus14-power-bi

Conversation

@flanakin

@flanakin flanakin commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

🛠️ Description

Updates both Power BI report variants from the FinOps hubs v1_2 schema to v1_4 (FOCUS 1.4), following the same pinned-version pattern used for the v1_2 upgrade (fa3ff33). Part of #2120 (W5 in the FOCUS 1.4 plan).

KQL variant (src/power-bi/kql/)

  • Shared.Dataset/definition/tables/Costs.tmdl
    • Repointed the DirectQuery partition from Costs_v1_2 to Costs_v1_4 (pinned, not the unversioned Costs() alias).
    • Added TMDL column definitions for all 22 new v1_4 columns: AllocatedMethodDetails, AllocatedMethodId, AllocatedResourceId, AllocatedResourceName, AllocatedTags, ContractApplied, HostProviderName, ServiceProviderName (FOCUS 1.3), CommitmentProgramEligibilityDetails, InvoiceDetailId, and the 12 ContractCommitment* columns (FOCUS 1.4). Dynamic columns are tostring()-converted in the KQL query and modeled as string, matching the existing SkuPriceDetails/Tags pattern.
    • Note: the work item enumerated 10 new columns, but the ground-truth Costs_final_v1_4 table also adds the 12 ContractCommitment* columns, so all 22 are modeled. x_SourceValues remains intentionally unmodeled (pre-existing).
  • Shared.Dataset/definition/tables/ReservationRecommendations.tmdl: Recommendations_v1_2Recommendations_v1_4.

Decisions: ProviderName/PublisherName model columns

Kept both model columns, derived from the new columns instead of removing them:

  • KQL variant: | extend ProviderName = HostProviderName | extend PublisherName = ServiceProviderName in the partition query.
  • Storage variant: null-backfill from HostProviderName/ServiceProviderName when reading FOCUS 1.4 exports.

Rationale: Costs[PublisherName] is bound to a table visual in CostSummary, Invoicing, and RateOptimization (both variants), and Costs[ProviderName] is referenced by two DAX measures in each Shared.Dataset. Removing the columns would break those visuals/measures and any customer-customized reports built on the shared dataset. The derivation is semantically faithful to the hub's own down-conversion (HostProviderName falls back to ProviderName; ServiceProviderName falls back to coalesce(PublisherName, ProviderName)).

Storage variant (src/power-bi/storage/)

  • Shared.Dataset/definition/tables/Costs.tmdl
    • Added Has14 presence flag (ServiceProviderName column) alongside HasPreview/Has10/Has12.
    • New normalization steps (Ensure14ColsAlignNewProvidersAlign14): create any missing FOCUS 1.3/1.4 columns (null for older exports), backfill HostProviderNameProviderName and ServiceProviderNamecoalesce(PublisherName, ProviderName) for ≤1.2 data, and backfill the deprecated ProviderName/PublisherName from the new columns for 1.4 data. Handles mixed-version folders (fills only nulls).
    • Added the same 22 model columns; typed columns (ContractCommitmentCreated/LastUpdated → datetimezone, the two percentage columns → number) added to the existing Table.TransformColumnTypes list.
  • Shared.Dataset/definition/expressions.tmdl: x_SourceVersion inference in ftk_Storage now detects 1.4 by ServiceProviderName presence (mirroring the hub KQL heuristic) and also detects 1.2 by InvoiceId presence (previously everything non-preview was labeled 1.0).
  • src/power-bi/queries/ftk_NormalizeSchema.pq: no changes needed. It normalizes legacy actual/amortized (non-FOCUS) exports, which never contain FOCUS 1.3/1.4 columns; its FOCUS-1.0-shaped output (with ProviderName/PublisherName) is handled by the new backfill logic downstream.

Report strings

No report.json changes were needed: an exhaustive grep found no "FOCUS 1.2"/"1.2-preview" supported/output-version claims. The only FOCUS version strings are "FOCUS 1.0 preview" backward-compat parameter descriptions, which genuinely describe legacy input exports and were left as is.

Docs and changelog

  • docs-mslearn/toolkit/hubs/compatibility.md: added a hubs 15+ / Power BI 15+ row ("KQL reports use the FinOps hubs v1_4 schema for FOCUS 1.4") and scoped the prior row's Power BI column to 12-14; ms.date → 07/15/2026. (Checked flanakin/focus14-phase0-docs — it doesn't touch compatibility.md, so no overlap.)
  • docs-mslearn/toolkit/power-bi/*.md: no v1_2 schema claims exist; the export-dataset-version tables (1.0, 1.0r2, 1.2-preview) describe input export versions and were left alone.
  • docs-mslearn/toolkit/changelog.md: added a "Power BI reports v15.0.0" section under Unreleased (no overlap with the hubs v15 entries already written by the stack).

Remaining _v1_2 references

grep -rn '_v1_2' src/power-bi/ returns zero hits. (The storage variant's back-compat logic is column-presence based, not version-function based, so no deliberate _v1_2 references remain either.)

Binaries that could NOT be updated (manual regeneration needed)

  • src/power-bi/cm-connector/CostManagementConnector.pbix
  • src/power-bi/cm-connector/CostManagementTemplateApp.pbix

These are the Cost Management connector/template app binaries. They embed the ftk_LoadData/ftk_NormalizeSchema queries and are built from non-FOCUS exports, so no v1_4 change is strictly required, but they should be regenerated if the shared query files are ever re-synced. The 12 .pbip files are text pointers and required no changes; the .pbix report binaries normally produced at release time must be re-exported from the updated .pbip/TMDL sources as part of the release process.

Verification

  • grep -rn '_v1_2' src/power-bi/ → 0 hits.
  • All model sourceColumn values in the KQL Costs table verified against the Costs_v1_4() projection + partition-query extends (only intentional derived/computed columns differ; ProviderName/PublisherName covered by the new extends).
  • Pester unit suite: 2047 passed, 0 failed, 4 skipped (includes the FOCUS schema regression harness from the base branch).
  • TMDL indentation (tabs) and lineageTag uniqueness verified; no JSON files were modified.

Stacking

⚠️ Stacked on #2128's branch (flanakin/focus14-phase7-tests-changelog) — the KQL reports pin to Costs_v1_4()/Recommendations_v1_4(), which only exist with the v1_4 hub schema from that stack. Do not retarget to flanakin/focus14 until the stack below merges.

📋 Checklist

🔬 How did you test this change?

  • 🤏 Lint tests
  • 🤞 PS -WhatIf / az validate
  • 👍 Manually deployed + verified
  • 💪 Unit tests
  • 🙌 Integration tests

📦 Deploy to test?

  • Hubs + ADX (managed)
  • Hubs + Fabric (manual) — URI:
  • Hubs (manual)
  • Hubs (no data)
  • Workbooks
  • Alerts

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

🤖 Generated with Claude Code

Repoint KQL reports from Costs_v1_2/Recommendations_v1_2 to the new
v1_4 hub functions and reconcile the Costs model with the FOCUS 1.4
output schema (22 new columns). Retain the deprecated ProviderName and
PublisherName model columns by deriving them from HostProviderName and
ServiceProviderName so existing visuals and custom reports keep
working. Storage reports gain a Has14 normalization branch that
backfills new FOCUS 1.3/1.4 columns for older exports and the
deprecated provider columns for 1.4 exports, plus FOCUS 1.4/1.2
source-version detection. Update hubs compatibility docs and changelog.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
flanakin and others added 2 commits July 15, 2026 17:21
Combines the base branch's origin/dev merge (including the x_SkuTerm ISO 8601
fix from #2175) and Q4 ContractCommitments schema updates with this branch's
FOCUS 1.4 Power BI changes. Changelog conflict resolved by merging this PR's
Power BI entries into the restructured v15 Power BI reports section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants