Forum Discussion

slatka11's avatar
slatka11
Icon for Helper I rankHelper I
3 years ago
Solved

Average for a group in a different table

I am looking to caclulate the average hours worked by day by group using the following data from two different tables:   TABLE 1 Date Name Group ID Hours Worked 1/6/2023 John Doe 123 ...
  • v-jingzhang's avatar
    v-jingzhang
    3 years ago

    Hi slatka11 

     

    You can create a measure with this code: 

    Avg of Hours Worked = DIVIDE(SUM('Table 1'[Hours Worked]),DISTINCTCOUNT('Table 1'[Name]))

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.