Forum Discussion

koorosh's avatar
koorosh
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

Dynamically currency format symbol

Hello Experts, There is a table including two columns 'Value' and 'Currency'. I wrote a measure 'Invoice' and following DAX to get dynamic currency format . But as you see the result is not correct. ...
  • v-kelly-msft's avatar
    v-kelly-msft
    4 years ago

    Hi koorosh ,

     

    Try:

    Invoice =
    var _invoice = [Value]/100
    return
    SWITCH(
    SELECTEDVALUE('Table'[Currency],"USD"),
    "USD",FORMAT(_invoice,"$#,##0.##"),
    "GBP",FORMAT(_invoice,"£#,##0.##"),
    "EUR",FORMAT(_invoice,"€#,##0.##"),
    "AUD",FORMAT(_invoice,"A$#,##0.##"),
    "NZD",FORMAT(_invoice,"OZ#,##0.##"),
    "CAD",FORMAT(_invoice,"C$#,##0.##")
    )
    )

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my reply as a solution!