如何从 Power BI 桌面中的度量中获取平均值 [英] How to get average from a measure in Power BI desktop
问题描述
在我的数据源中,我有列 Quoted 和 Submitted.
In my data source I have column Quoted and Submitted.
将 Sum(Quoted)
除以 SUM(Submitted)
得到 Sub to Quote
比率.
Dividing the Sum(Quoted)
by SUM(Submitted)
gives us Sub to Quote
ratio.
所以我创建了一个划分引用/提交的度量.
So I have created a measure that divides Quoted/Submitted.
Sub to Quote = DIVIDE([Total Quoted], [Total Submitted])
现在,我怎样才能简单地获得该比率的平均值?
Now, how can I simply have Average of that ratio?
所以我需要看到 8.18%
.PBIX 文件可在此处访问:
.PBIX file can be accessed here:
https://www.dropbox.com/s/ug932qjju7zahfs/ClearanceDateNewWithCatalytic1.pbix?dl=0
推荐答案
我会尝试这样的:
Sub to Quote =
AVERAGEX(
SUMMARIZE(dim_Date,
dim_Date[Qtr Year],
"Average", DIVIDE( [Total Quoted], [Total Submitted] )
),
[Average]
)
这会汇总您的表格以获得每个季度的平均值,然后对这些平均值进行平均.
This summarizes your table to get the average for each quarter and then averages those averages.
注意:这将返回 8.15%
而不是 8.18%
.我猜这只是一个四舍五入的差异.
Note: This returns 8.15%
rather than 8.18%
. I'm guessing this is just a rounding difference though.
这篇关于如何从 Power BI 桌面中的度量中获取平均值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!