← Files Power BI DesktopARCHIVED FILE
scripts/Apply-PowerBIPBIPMeasureDraft.ps1
653 Bytes · Oct 2, 2026 · 00:32 UTC
param([string]$PbipPath, [string]$TableName, [string]$MeasureName, [string]$Expression, [switch]$Apply, [switch]$Json)
$ErrorActionPreference = 'Stop'
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$draft = & (Join-Path $scriptRoot 'New-PowerBIMeasureDraft.ps1') -TableName $TableName -MeasureName $MeasureName -Expression $Expression -Json | ConvertFrom-Json
$result = & (Join-Path $scriptRoot 'Apply-PowerBIPBIPTmdlDraft.ps1') -PbipPath $PbipPath -ObjectName "$TableName.$MeasureName" -ObjectType Measure -Tmdl $draft.tmdl -Apply:$Apply -Json | ConvertFrom-Json
if ($Json) { $result | ConvertTo-Json -Depth 6; return }
$result
SHA-256: d776d8d2e4640c8f3e2215c60d4ff50265a1a0e6cdc8a6eddcd26ea63c5bdb30