Forum Discussion
Average time from multiple rows per month
I have the below data already calculated in the far right column. The far right column is the time difference between the left 2 columns. I need to average the total times per month for a trend.
I'm trying to break the measure into steps. I know I need to start by getting a sum of the time per month and then average them out. Can someone help me out with this.
- Anonymous5 years ago
Hi dbrandone ,
You can first create a month column.
YearMonth = YEAR([Date])&"-"&MONTH([Date])Then
Average per month = CALCULATE(AVERAGE('Table'[Hour]),ALLEXCEPT('Table','Table'[YearMonth]))Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- dbrandone
Helper IV
I created a column that puts the time difference in a format that Power BI would recognize.
- AnonymousNot applicable
Hi dbrandone ,
You can first create a month column.
YearMonth = YEAR([Date])&"-"&MONTH([Date])Then
Average per month = CALCULATE(AVERAGE('Table'[Hour]),ALLEXCEPT('Table','Table'[YearMonth]))Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.