Video by: Reid Havens
Learn how to leverage Tabular Editor automation to easily format all the DAX measures in your Power BI (PBIX) model. Two versions of the format code is provided below. For developers using version 2.13 or later. There is a faster and more secure function in Tabular Editor to use now. For people running the earlier versions of Tabular Editor, the previous function (show in the video) is still provided. It is recommended though to download and use TE 2.13 or later for best results.
CODE SNIPPET (WHEN USING 2.13 OR LATER)
Model.AllMeasures.FormatDax();
CODE SNIPPET (WHEN USING EARLIER VERSIONS)
foreach (var m in Model.AllMeasures) { m.Expression = FormatDax(m.Expression); }
RELATED CONTENT
Tabular Editor Format DAX Functions
Show DAX Measures in Description Tooltip
PowerBI.tips Business Ops