如何在DAX查询的过滤器中使用测量结果?
我在Power BI数据集中有一个措施,称为Nett Wipp
。 我需要编写一个查询,该查询从我的数据集和过滤器中获取一些数据,其中nett wip
不是0。
在普通英语中,我的查询应该是: get m get me发票recov%nett wip不是0 (发票recov%是表中的一列)
使用dax Studio查询构建器,生成以下查询:
EVALUATE
CALCULATETABLE(
ROW(
"Invoice Recov %", [Invoice Recov %]
),
KEEPFILTERS( FILTER( ALL( [Nett WIP] ), [Nett WIP] <> 0 ))
)
但是,由于过滤器中使用的度量,此查询不起作用。我知道该度量是一种计算,这就是为什么它不起作用,但是我该如何编写此查询呢?在MSSQL中,我会考虑使用“ have”子句,是否有类似于dax中的子句类似的东西?
请原谅我的天真,因为我是DAX的新手。 任何帮助将不胜感激。
I have a measure in my power bi dataset called Nett Wipp
.
I need to write a query that gets some data from my dataset and filters where Nett Wip
is not 0.
In plain English my query should be: get me Invoice Recov % where Nett Wip is not 0
(Invoice Recov % is a column in a table)
Using Dax Studio Query Builder, the below query is generated:
EVALUATE
CALCULATETABLE(
ROW(
"Invoice Recov %", [Invoice Recov %]
),
KEEPFILTERS( FILTER( ALL( [Nett WIP] ), [Nett WIP] <> 0 ))
)
However, this query does not work as a result of the measure being used in the filter. I understand that the measure is a calculation, and that is why it is not working, but how can I write this query then? In MsSql I would consider using a having clause, is there something similar to a having clause in DAX?
Please forgive my naivety as I am very new to Dax.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试:
You can try :