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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Wieuwzak
Frequent Visitor

Format function misbehaving. How to achieve the format that I need?

Hi,

 

I have a dataset and want to use the format function to apply custom format to a measure. However, when that measure is used in visuals, that measure no longer handles relationships. A measure without the format formula works fine. My goal is to format currency to nl-NL locale and display that format in visuals.

 

The format displays correctly in Power query, but not in visuals. It can be displayed correctly using the format function (see Formatted measure), but then the relationships are no longer acknowledged.

I've tried every possible setting regarding regions and locale but all tries have failed to achieve this other than using the format function.

 

Normale measure: Measure = sum(DATA_Budgets[Amount])

Formatted measure: formatted measure = format(SUM(DATA_Budgets[Amount]),"Currency","nl-NL")

 

Power Bi settings.pngLocale for import.pngExcel sample data.pngPBIX Relationships.pngVisuals.pngPower query format settings.png

 

Please see pictures. How can I overcome this issue? Thanks in advance for advice!

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

The format applied in Power Query does not direcly affect the format in the report.

 

In general, I'd recommend using formatting strings on your measures rather than using FORMAT to convert your measure to output a string. FORMAT does not affect the model relationships but it will make a blank return an empty string, so you need to account for that. For example,

formatted =
VAR _Value = SUM ( DATA_Budgets[Amount] )
RETURN
    IF (
        NOT ISBLANK ( _Value ),
        FORMAT ( _Value, "Currency", "nl-NL" )
    )

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

The format applied in Power Query does not direcly affect the format in the report.

 

In general, I'd recommend using formatting strings on your measures rather than using FORMAT to convert your measure to output a string. FORMAT does not affect the model relationships but it will make a blank return an empty string, so you need to account for that. For example,

formatted =
VAR _Value = SUM ( DATA_Budgets[Amount] )
RETURN
    IF (
        NOT ISBLANK ( _Value ),
        FORMAT ( _Value, "Currency", "nl-NL" )
    )

Thank you. This was the solution!

lbendlin
Super User
Super User

Refactor your data model (denormalize the department and group dimensions)

 

Read the blog entry (and watch the video) for the August 2024 announcement on the new Formatting philosophy.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.