cancel
Showing results for
Did you mean:
Frequent Visitor

## DAX: Measure to calculate 15-minute averages from one-minute data

I have one-minute data in a table.  This is a lot of data points to put on a time-series line chart.  I am looking to take my one-minute data and calculate a measure to roll up the values into 15-minute averages, and then show those values on a line chart visual instead of the original data.  I am looking for a DAX formula that will take my one-minute data and calculate 15-minute averages to put on a chart.

I am looking at a solution like the following message, but I don't know how to roll up into 15-minutes.

https://community.powerbi.com/t5/Desktop/calculate-average-of-a-measure/m-p/297565#M131310

If it helps, I already have a table with a column of 15-minute containers for my data.  For example, for the 15 minute rows between 11:00 and 11:14, I have another column with a value of 11:00.  Likewise, for 11:15 to 11:29, I have a value of 11:15.  Can I group by and average by that column?  I am confused by the uses of AVERAGEX, SUMMARAIZE, GROUPBY, etc.

Thank you!

Responsive Resident

## Re: DAX: Measure to calculate 15-minute averages from one-minute data

Hi,

If you use Power BI and use the 15-minute attribute on the axis in the line chart, you could just change the aggregation of the data column to AVERAGE.

Or create a measure like this:

NewMeasure = AVERAGE('Table'[DataColumn])

If you want to for example SUM the 15 minute averages (in the grand total) you could do something like

NewMeasure = SUMX(Values('Table'[15min]), CALCULATE(AVERAGE('Table'[DataColumn]))).

Best Regards

Ulf

Announcements

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors