Reputation: 3041
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?
Upvotes: 0
Views: 2411
Reputation: 3741
Do you try the FORMAT function?
-- 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" ) )
}
Upvotes: 1