Hans-Georg_Puls's avatar
Hans-Georg_Puls
Icon for Super User rankSuper User
8 months ago
Status:
New

Switching from Currency to Dynamic format PBI generates an invalid format string for some currencies

While working on a Power BI project, I encountered some strange behaviour regarding the dynamic formatting of measures.

I broke this behaviour down into a simple setup:

  1. A simple table with a "Date" column formatted as date and a "Value" column formatted as "Currency" with dollars as the currency
  2. A simple measure: "Sum = SUM(Expenses[Value])" formatted as "Currency" with dollars as the currency
  3. A table visual with "Date" and "Sum" as columns

     

    Then I started experimenting with the format setting of the "Sum" measure:

    • Changing the "Format" to "Dynamic" resulted in a valid format string:
      "\$#,0.###############;(\$#,0.###############);\$#,0.###############"
    • Resetting the "Format" to "Currency" did not change anything
    • Changing the currency to pounds displayed the values in the table with the correct symbol
       

       

       

    • Changing the "Format" to "Dynamic" again displaeyd an invalid format string and an error message appeared instead of the table visual

       

    • I tried the same thing with some other non-dollar currencies. The result was the same. As soon as I switch to the "Dynamic" format, the format string is invalid

The invalid format strings look like this: ""£"#,0.00;-"£"#,0.00;"£"#,0.00"
It's easy to see what's wrong with it and correct it: "\£#,0.00;-\£#,0.00;\£#,0.00".

But why does it work for dollars and not for at least some other currencies such as euros or pounds?

Could it depend on the "Regional Setting", which currency is preferred? My "Regional Settings" are "English (United States)" as "Application language" and "English (United States)" for "Model language".

 

Other people could confirm this behaviour for other regional settings. It seems that the generation of the format string only works for the currency unit matching your regional settings. (here is the posting)

No CommentsBe the first to comment