0

是否可以在 DAX Studio 中创建表并将代码复制到 PowerBI。在下面的示例代码中(来自优秀的站点 Dax.do)是否需要单独创建每个度量值,或者是否可以导入整个代码?谢谢你的帮助!

DEFINE
    MEASURE Customer[# Customers] = COUNTROWS ( Customer )        
    MEASURE Customer[# Names] =
        DISTINCTCOUNT ( Customer[Name] )
    MEASURE Customer[# Countries 1] =
        DISTINCTCOUNT ( Customer[CountryRegion]
        )
    MEASURE Customer[# Countries 2] =
        COUNTROWS ( DISTINCT ( Customer[CountryRegion] ) )
EVALUATE
SUMMARIZECOLUMNS (
    Customer[Continent],
    "# Customers", [# Customers],
    "# Names", [# Names],
    "# Countries 1", [# Countries 1],
    "# Countries 2", [# Countries 2]
)```
4

0 回答 0