在功率BI/ DAX中的切片机中,是否有一个函数可以将平均值和平均值汇总在一起?
我想以平均每月的平均数量(每支或多个团队总数)进行视觉效果(同时保持日期hierachy每天显示数据)。
我有一张每天每天每天数量的桌子。
日期 | 数量 | |
---|---|---|
1-1-2022 | 1 25 | 1 25 |
1-1-1-2022 | 2 | 25 |
1-1-2022 | 3 | 25 |
1-1-2022 | 4 | 25 |
2-1-2022 | 1 | 25 |
2-1-2022 | 2 | 25 |
2 25 2-1-2022 | 3 | 23 |
2-1-2022 | 4 | 15 |
3-1-2022 | 1 | 27 |
3-1-2022 | 2 | 29 |
3-1-2022 | 3 | 23 |
3-1-2022 | 4 | 15 |
4-1-2022 | 1 | 27 |
4-1-2022 | 29 | 4-1-2022 |
| 3 | 19 |
4-1-2022 | 4 | 15 |
.. .. | .. | .. .. |
31-1-2022 | 1 | 25 |
31-1-2022 | 2 | 10 |
31-1-2022 | 3 | 15 |
31-1-2022 | 4 | 29 |
(See excel example below)
At the moment i'm using the [amount] and [date] fields to feed he visual, no measures.
The user can select one or many teams with a slicer to show different averages per month. Selecting one team gives the desired result.
But...
Selecting two or more teams gives a logical, but undesired result. It shows the average of team averages per month. Desired would be to see the sum of averages per team per month.
即IE如果第一个月,团队1-4的平均值为25 23.5 22.7 27.5所有团队的结果现在为24.68(AVG的AVG)。 期望的是98,7(AVG之和)
是否有一种方法可以通过DAX度量进行操作?
态
I'd like to make a visual with average amount (totalled per one or more teams) per month (while keeping date hierachy to show data per day).
I have a table with amount per team per day.
Date | team | Amount |
---|---|---|
1-1-2022 | 1 | 25 |
1-1-2022 | 2 | 25 |
1-1-2022 | 3 | 25 |
1-1-2022 | 4 | 25 |
2-1-2022 | 1 | 25 |
2-1-2022 | 2 | 25 |
2-1-2022 | 3 | 23 |
2-1-2022 | 4 | 15 |
3-1-2022 | 1 | 27 |
3-1-2022 | 2 | 29 |
3-1-2022 | 3 | 23 |
3-1-2022 | 4 | 15 |
4-1-2022 | 1 | 27 |
4-1-2022 | 2 | 29 |
4-1-2022 | 3 | 19 |
4-1-2022 | 4 | 15 |
.. | .. | .. |
31-1-2022 | 1 | 25 |
31-1-2022 | 2 | 10 |
31-1-2022 | 3 | 15 |
31-1-2022 | 4 | 29 |
(See excel example below)
At the moment i'm using the [amount] and [date] fields to feed he visual, no measures.
The user can select one or many teams with a slicer to show different averages per month.
Selecting one team gives the desired result.
But...
Selecting two or more teams gives a logical, but undesired result.
It shows the average of team averages per month.
Desired would be to see the sum of averages per team per month.
ie if for the first month team 1-4 have averages of 25 23.5 22.7 and 27.5 the result of all teams is now 24.68 (avg of avg).
Desired would be 98,7 (sum of avg)
Is there a way to do this with a dax measure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么使用迭代器?似乎粒度与桌子中的粒度相同。您可以简单地使用
平均
,然后使用全部
删除上下文过渡。dax计算
输出
Why are you using an iterator? Seems like the granularity is the same as the one in the table. You can simply use
AVERAGE
and remove context transition withALL
.DAX Calculation
Output