Forum Discussion
Average over certain period
- 6 years ago
Hi CalvinL ,
We can use the Power Query and create a calculate column to meet your requirement.
1. In Power Query Editor, we can use Date only and Time only functions to create two columns.
2. Then we can create a calculate columns in data view,
Column = var time1 = TIME(0,0,0) var time2 = TIME(12,0,0) return CALCULATE(AVERAGE('Table'[Value]),FILTER('Table',EARLIER('Table'[Date.1])='Table'[Date.1] && 'Table'[Time]>=time1&&'Table'[Time]<=time2))If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi CalvinL ,
We can use the Power Query and create a calculate column to meet your requirement.
1. In Power Query Editor, we can use Date only and Time only functions to create two columns.
2. Then we can create a calculate columns in data view,
Column =
var time1 = TIME(0,0,0)
var time2 = TIME(12,0,0)
return
CALCULATE(AVERAGE('Table'[Value]),FILTER('Table',EARLIER('Table'[Date.1])='Table'[Date.1] && 'Table'[Time]>=time1&&'Table'[Time]<=time2))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I would like to take the average for a certain time interval, from 20215 11 months later and put that average on a graph as a reference line.