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

查看:35
本文介绍了如何在 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.

更令人困惑的是,如果我转到要过滤的表上的 Visual Level Filters 部分,我可以使用 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% 的玩家分组.但是如果没有玩家 A",这 5 名玩家将不会成为该系列的一部分——那么他们是否属于所需的子集?模棱两可.

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天全站免登陆