简体   繁体   English

在Power BI中作为没有计算列或计算表的切片器进行测量

[英]Measure as a slicer without calculated columns or calculated tables in Power BI

I am struggling with setting a measure as a slicer while I cannot use calculated columns or calculated tables. 我无法将度量设置为切片器,但是无法使用计算列或计算表。 I have a table simply like this: 我有一张像这样的桌子:

源数据表

I have added two measures which give the count and the list of distinct Y for each X: 我添加了两个度量,分别给出了每个X的计数和不同Y的列表:

Distinct Y in each X - Count = 
CALCULATE (
    DISTINCTCOUNT ( Table1[Y] ),
    ALLEXCEPT ( Table1, Table1[X] )
)

and

Distinct Y in each X - List = 
    CALCULATE ( 
        CONCATENATEX ( 
            DISTINCT ( Table1[Y] ),
            Table1[Y], 
            ", "
        ),
        ALLEXCEPT ( Table1, Table1[X] )
    )

输出显示度量值

Now what I need to have is: 现在我需要具备的是:

  1. the measure "Distinct Y in each X, Count" as a slicer 切片器的量度“每个X的不同Y,计数”
  2. a visual table reacting to the slicer. 对切​​片器做出反应的可视表。 This visual table contains only W and Z, something like below: 该可视表仅包含W和Z,如下所示:

所需的输出

I cannot use calculated columns or calculated tables. 我不能使用计算列或计算表。 Do you know if this is possible with Power BI? 您知道Power BI是否可行?

Many thanks 非常感谢

You cannot use a Measure in a Slicer, in Power BI. 您不能在Power BI中的切片器中使用度量。

To achieve the functionality you require, you will have to use either a calculated column, or a calculated table. 要获得所需的功能,您将不得不使用计算列或计算表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM