How to unlock new features in Power BI datasets managed with Tabular Editor
UPDATE THE COMPATIBILITY LEVEL
…to unlock new features like measure dynamic format strings when managing models by using Tabular Editor.
RELEASE-SPECIFIC BEHAVIORS OF POWER BI DATASETS
In the monthly updates for Power BI, there may be new features that appear for preview. For example, in the April 2023 update, dynamic format strings for measures released into preview. This feature allows you to specify a DAX format string expression for measures, like you already could do with calculation groups.
In Power BI, these features become readily available once enabled from the ‘Preview features’ section of the 'Options’ menu. However, when you are connected to a dataset or metadata with Tabular Editor, the properties will not be visible. That’s because behind-the-scenes, Power BI upgrades the model compatibility level when using a preview feature for the first time. The compatibility level refers to the release of the analysis services engine, and features specific to that release. The best documentation for the tabular object model (TOM) compatibility levels can be found by Mathias Thierbach, here.
When you use a preview feature in Power BI, it updates the compatibility level (CL), automatically.
In the video, the CL is 1550 in the new data model, created in Power BI Desktop.
Once measure dynamic format strings are used for the first time, the CL is upgraded to 1601.
In this short article, I will show you how to upgrade the compatibility level of your data model in Tabular Editor in order to access new features like dynamic format strings.
Note that upgrading the compatibility level is an irreversible change; you can upgrade the compatibility level, but you cannot lower it. It’s thus important to ensure you have a back-up or are using source control. This may be problematic in two instances:
A feature you are using becomes deprecated in a higher compatibility level.
This is very rare, but still important to be aware of.You may migrate your model to a lower compatibility level, i.e. Power BI Premium to AAS/SSAS.
This is also relatively rare, but not unheard of.
This is important to know also if you are just working in Power BI Desktop; once you try a preview feature in your dataset once, the compatibility level is upgraded. The implications of this are few, but it’s good to know.
HOW TO UPGRADE THE MODEL COMPATIBILITY LEVEL IN TABULAR EDITOR
This article is intended for developers using Tabular Editor to manage remote data models and metadata. If you are using Tabular Editor as an external tool for Power BI Desktop, this is not a recommended approach. You need to enable unsupported features for the property to be visible. Instead, you can just use the feature from Power BI Desktop the first time, and the compatibility level will be updated, automatically.
Open your model in Tabular Editor
Select the ‘Database’ or ‘Model’ object in the TOM Explorer window
In the ‘Properties’ window, click the dropdown to expand the ‘Database’ object properties
The Compatibility Level is visible as the first property. Highlight and change it to the latest one.
From Mathias’ site you can find the latest compatibility level, and how to find this yourself.
The latest compatibility level for a Power BI dataset is also generally visible when you create a new Power BI dataset in Tabular Editor.Save the changes. You should now have the new features in that release. For dynamic format strings, the best way to change this property is to use the dropdown in the expression editor window.
MEASURE DYNAMIC FORMAT STRINGS - A REPORT-SPECIFIC MEASURE PROPERTY
Perhaps to finish with one last footnote - While doing some initial testing, I noticed that dynamic format strings do not work in other client tools like Analyze-in-Excel. This is noteworthy if you start using them heavily for your measures, as static format strings do work in other tools. Another point to keep in mind when considering report-specific objects and properties.
TO CONCLUDE
To access new / preview features in your data model from Tabular Editor, you need to update the ‘Compatibility Level’. If you are managing your dataset entirely with Tabular Editor, for example in the advanced data model management or enterprise content publishing usage scenarios, this is important to know. Just be aware that a compatibility level upgrade cannot be reverted, so make sure that you are using version control in case you need the previous compatibility level version.