Forum Discussion
Help!~ Average hours per person by task
Hi all,
I am still new to PowerBI so DAX is overwhelming to me. I am not sure do i start with calculate or average first... =(
I am trying to calculate the average hours per person spent on the task "Operation" for each place.
Objective is to plot a bar chart of:
y-axis: average hours per person on task "Operation"
x-axis: Place
Below is my sample data:
Your help is much appreciated.
Thank you very much!
4 Replies
- amitchandak
Super User
byWing , Try a measure like
averageX(Values(Table[Person]) , calculate(Sum(Table[Hour/month]), filter(Table, Table[Task] = "Opeartions")))
- byWing
Helper I
Hi amitchandak
Thank you for your reply.
I tried your suggestion but I am not sure what is wrong:Would appreciate your advice pls. Thank you for your help~
- byWing
Helper I
hi All,
I am still struggling with this. Would anyone be able to help please?
Thank you so much~
- BrianConnelly
Resolver III
Try the following which calculates the average hours per person, broken into variables for easy to read the steps..
Average Hours Per Person = VAR filteredOperations = FILTER(Table, Task = "Operations) VAR averageHoursPerPerson = SUMMARIZE(filteredOperations,Table[Person],"Avg.Hours",AVERAGE(Table[Hour])) VAR averageHours = AverageX(averageHoursPerPerson, [Avg.Hours]) RETURN averageHours