[英]How to calculate average using power bi
In power bi i have 2 table在 power bi 中,我有 2 张桌子
Table 1 (Total no of seats) Venue 1 100 seats Venue 2 150 seats表 1 (总座位数) 场地 1 100 座位 场地 2 150 座位
Table 2 (No of seats used) Venue 1 40 seats Venue 2 75 seats表 2 (已使用座位数) 场地 1 40 个座位场地 2 75 个座位
I need to calculate how to many seats used我需要计算使用了多少个座位
ex (40/100) *100 = 40%前 (40/100) *100 = 40%
Can someone helps me有人可以帮助我吗
**Current database i can't join these table **当前数据库我无法加入这些表
Try to use average function did not work尝试使用平均功能不起作用
Assuming your tables look like this:假设您的表如下所示:
Table 1:表格1:
Venue | Total Seats
-----------------------
Venue 1 | 100
Venue 2 | 150
Table 2:表 2:
Venue | Seats Used
----------------------
Venue 1 | 40
Venue 2 | 75
Create a relationship between Table 1
and Table 2
on field Venue
, then you can create a measure:在字段
Venue
上创建Table 1
和Table 2
之间的关系,然后您可以创建度量:
Seat Utilisation =
DIVIDE (
SUM ( 'Table 2'[Seats Used] ),
SUM ( 'Table 1'[Total Seats] ),
BLANK()
)
See https://pwrbi.com/so_55470616/ for an example PBIX file有关示例 PBIX 文件,请参阅https://pwrbi.com/so_55470616/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.