Forum Discussion
How to show average hours on graph
Here is a working solution for you. I created a measure that respects the current filter context and displays an average hours line. I had to convert the hours to a decimal number first
here is the sample workbook https://www.dropbox.com/s/v8y46cw5bixolam/average%20hours.pbix?dl=1
Here is my measure
Average = CALCULATE(sum(Data[Decimal Hours])/DISTINCTCOUNT(Data[Date]),filter(all(Data[Date]),Data[Date] >=FIRSTDATE(Data[Date]) && Data[Date] <=LASTDATE(Data[Date])))
Here is the hour conversion (PQFL)
= Table.AddColumn(#"Extracted Time", "Decimal Hours", each Time.Hour([hour]) + Time.Minute([hour])/60)
I could not do the measurement, can you send me the file?
Or show me how your table is?
- MattAllington9 years agoCommunity Champion
tiagotas wrote:I could not do the measurement, can you send me the file?
Or show me how your table is?
The file is linked in my earlier post.