Forum Discussion

Wieuwzak's avatar
Wieuwzak
Frequent Visitor
2 years ago
Solved

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 measur...
  • AlexisOlson's avatar
    2 years ago

    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" )
        )