Skip to content

Commit

Permalink
Fix missing ] escape in time intelligence measure expressions (#42)
Browse files Browse the repository at this point in the history
Fix an issue that generates an invalid time intelligence expression when the base measure name contains a closed square bracket character.
  • Loading branch information
albertospelta authored Mar 15, 2024
1 parent 462f8ec commit ac0df8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dax.Template/Measures/MeasureTemplateBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public virtual string GetDaxExpression(TabularModel model, string? originalMeasu
string.IsNullOrWhiteSpace(templateName)
? originalMeasureName
: Template.GetTargetMeasureName(templateName, originalMeasureName);
return $"[{replaceMeasureName}]";
return $"[{replaceMeasureName.Replace("]", "]]")}]";
});
}
else
Expand Down

0 comments on commit ac0df8b

Please sign in to comment.