Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Tomi
Regular Visitor

Dynamic Format String Expression error

Couldn't load the data for this visual
CalculationProperty(measure xxx) (1,1) Calculation error in measure xxx/
Invalid FormatStringDefinition expression of measure xxx. FormatStringDefinition must have a DAX expression which is of type String.

-----------------
Measure xxx uses a dynamic format string expression by referencing [MeasureABC] which returns type string.  A simplified expression is shown below.

--------------------
[MeasureABC] = "#,0"

--------------------
Note - issue only occurs after a new unrelated and unused calculation group was added to the model. Workaround fix - can be resolved by a) simply deleting the calculation group or b) by simply copying the "#,0" directly into the measure xxx formatstringexpression and for all other measures instead of referencing [MeasureABC]. Why is the existence of a calc group cause this error to happen when it works fine before? This issue can be re-produced.

1 REPLY 1
v-jiewu-msft
Community Support
Community Support

Hi @Tomi ,

Based on the knowledge, dynamic format strings can be used with calculation groups.

vjiewumsft_0-1714381815997.png

 

You can view the following document to learn more about how to create a dynamic format string.

Create dynamic format strings for measures in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.