一个 table 基于另一个的平均值

Average of one table based on another

我有两个 table,OrgStructure 是一个非常基本的组织结构,Tickets 是该组织中员工提交的工单列表.两个 table 由 Manager 字段链接。

组织结构:

Manager,Employee
Chelsea,Anna
Chelsea,John
Chelsea,Mike
Chelsea,Nicole
Chelsea,Phil
Nicole,Arthur
Nicole,Brandon
Tom,Brian
Tom,Katie
Tom,William

门票:

TicketNo,Manager,Employee
T1,Chelsea,John
T2,Chelsea,John
T3,Chelsea,Nicole
T4,Chelsea,Phil
T5,Nicole,Brandon
T6,Tom,Katie
T7,Tom,Katie
T8,Tom,William

我的目标是计算每位经理提交的工单的平均值。

例如,Chelsea 手下有 5 名员工,在 Tickets table 中,有 4 张工单将她列为经理。我想要的是 4/5 这是她管理的人提交的平均票数。显然分子和分母在两个不同的table中。那么如何计算上述值呢?

这看起来很简单

AvgTicketePerManager = 
DIVIDE ( COUNT ( Tickets[TicketNo] ), COUNT ( OrgStructure[Employee] ) )