简体   繁体   English

如何在 Dax 中使用过滤器 function 时阻止 Power Bi 测量隐藏其他字段

[英]How to stop Power Bi measure from hiding other fields when using the filter function within Dax

I created a measure in Power BI using DAX that gets the total quantity for a specific item in the 'item' column.我使用 DAX 在 Power BI 中创建了一个度量,它获取“项目”列中特定项目的总量。 But when I use that measure in a table in Power Bi, it acts as a filter and hides other items from showing up in the table.但是,当我在 Power Bi 的表格中使用该度量时,它会充当过滤器并隐藏其他项目以使其不显示在表格中。 How can I handle this?我该如何处理? Do I need to create a measure for each item now?我现在需要为每个项目创建一个度量吗?

Here is my DAX expression for the measure:这是我对度量的 DAX 表达式:

Qty 'item name'= 

Calculate
(
    Sum
    (
        table[qty]
    )
    ,
    FILTER
    (       
        table,
        table[Item]="item name"
    )
)

In the field list of you visual, select Show items with no data option in the field dropdown menu.在您视觉的字段列表中,select 在字段下拉菜单中显示没有数据选项的项目。

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-data https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-data

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

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