如何在Power BI中按度量过滤结果 [英] How do I filter results by a measure in Power BI

查看:465
本文介绍了如何在Power BI中按度量过滤结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够通过某种措施进行过滤,以在Power BI中显示更细粒度的结果。我希望能够选择百分比在某个范围内的位置,或= 100%

I need to be able to filter by a measure to show more granular results in Power BI. I would like to be able to choose where the percentage is in a range, or = 100%

我对度量值的计算是这样的(每列只能为1或0):

My calculation for the measure is this (each column can only be 1 or 0):

errorPercentage = CALCULATE(SUM([missing data])/SUM([expected]))

这在表中工作正常,并正确显示了可以用许多不同方式削减的百分比。

This works fine in the table and correctly shows the percentage which can be cut in many different ways.

但是,当添加过滤器元素/视觉效果时,Power BI不会让我使用errorPercentage度量。

However, when adding a filter element/visual, Power BI wont let me use the errorPercentage measure.

更令人困惑的是如果我转到要过滤的表上的可视级过滤器部分,则可以使用errorPercentage度量值来过滤范围或值。

What is more confusing is that if I go to the Visual Level Filters section on the table I want to filter, I CAN use the errorPercentage measure to filter in a range or value.

有人可以建议吗一个易于使用的过滤器?我试图让报告的用户自己选择百分比范围,而不是预先定义范围。

Can anyone suggest an easy to use filter? I'm trying to let the users of the report choose a % range themselves, rather than having a pre-defined one.

推荐答案

您不能将聚合度量用作切片器。切片器将数据集过滤到参与给定维度的选定值的所有元组。度量不是维度。它不能用于标识记录的子集。

You can't use an aggregated measure as a slicer. A slicer filters a dataset to all tuples that participate in the selected values of a given dimension. A measure is not a dimension. It cannot be used to identify subsets of records.

假设我有关于篮球运动员的数据,并且想对平均罚球率为85%的运动员进行细分。想一想拥有这样一个平均值的所有不同玩家子集!也许我们有90%的球员A与一个得分为80%的球员B相匹配-他们的平均罚球率为85%(假设他们每次罚球的次数相同)。或者,玩家A可以与其他5个玩家组成,其百分比为84%。但是如果没有 Player A,那五个相同的球员就不会成为组合的一部分-那么他们还是不属于期望子集的一部分? am昧。

Suppose I had data on basketball players and I wanted to slice to the set of players whose 'Average Free throw percentage' was 85%. Think about all of the different subsets of players who would have such an average! Maybe we have "Player A" with 90 percent who could be matched with one "Player B" who scores 80 percent of his free throws -- they average 85% (assuming that they have taken the same number of total throws each). Or, "Player A" could be grouped with 5 other players whose percent is 84 percent. But those same 5 players wouldn't be part of the set without "Player A" - so are they or aren't they part of the desired subset? It's ambiguous.

这篇关于如何在Power BI中按度量过滤结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆