Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
stalerik
Helper II
Helper II

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!

1 REPLY 1
Anonymous
Not applicable

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.

 

Average.PNG

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors