DAX 度量 - 将数字输出为文本类型

DAX Measure - Output a number as Text type

我正在使用 DAX 计算具有不同数据类型(货币、%、整数和小数)的不同值,当我输出它时,我想将所有这些数据类型输出为文本数据类型。

如何在 DAX 度量的最后一步执行此操作?

你试试FORMAT功能吗?

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