如何解决DAX查询-从Powerbi中的表中过滤出值
我正在使用DAX在powerbi中进行一些数据分析。非常习惯Python,但DAX却使它迷失了。
我要尝试的是从度量中筛选出值。
目前的措施是这样的
Measure.Controllable =
CALCULATE(
countrows(table_adj_spec_uno),table_adj_spec_uno[column_uno] = "variable 1",USERELATIONSHIP(
'table_adj_spec_uno'[IncidentDate],'Table.Date'[DateOnly]
)
)
我需要从此表和列中滤除该值,
table_adj_spec_uno[column_two] <> BLANK()
和
table_adj_spec_uno[column_two] <> "Acceptance_mwap"
如何计算仅包含这些值的行?
此外,如果我想返回第二列作为度量,而没有上面的值,我在寻找什么DAX查询?
感谢任何帮助。
谢谢!
解决方法
尝试以下更改-
Measure.Controllable =
CALCULATE(
countrows(table_adj_spec_uno),table_adj_spec_uno[column_uno] = "variable 1",table_adj_spec_uno[column_two] <> BLANK(),table_adj_spec_uno[column_two] <> "Acceptance_mwap",USERELATIONSHIP(
'table_adj_spec_uno'[IncidentDate],'Table.Date'[DateOnly]
)
)
OR
Measure.Controllable =
CALCULATE(
countrows(table_adj_spec_uno),KEEPFILTERS(table_adj_spec_uno[column_uno] = "variable 1"),KEEPFILTERS(table_adj_spec_uno[column_two] <> BLANK()),KEEPFILTERS(table_adj_spec_uno[column_two] <> "Acceptance_mwap"),'Table.Date'[DateOnly]
)
)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。