0
votes

I am using a DAX to calculate different values with different data types (Currency, %, whole number and decimal number) and when I output this, I want to output all these data types as a Text data type.

How can I do this in the last step of a DAX Measure?

1

1 Answers

1
votes

Do you try the FORMAT function?

https://dax.guide/format/

--  FORMAT is a formatting function that formats a value based
--  on a format string.
EVALUATE
{
    ( "Percent",      FORMAT (                0.742, "Percent" )        ),
    ( "Currency (1)", FORMAT (             1234.567, "$#,0.00" )        ),
    ( "Currency (2)", FORMAT (             1234.567, """US$"" #,0.00" ) ),
    ( "Date (1)",     FORMAT ( DATE ( 2019, 3, 28 ), "yyyy-mm-dd" )     ),
    ( "Date (2)",     FORMAT ( DATE ( 2019, 3, 28 ), "m/d/yy" )         )
}