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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Average of Category Averages as a Measure

Can I create a Measure to average 'HydroVu Data'[value] for each 'SiteLocation'[name] with the last 24 hours and then take the average fo these averages? So the result would be a single number that describes the average, but isn't weighted in favor of SiteLocations with more data points.

So filter by DateTimeGMT, then get these averages grouped by SiteLocation[name] and then get the final average of those averages.

I looked at these and couldn't quite make sense of it:

https://community.powerbi.com/t5/Desktop/AS-AVERAGED-BY-A-CATEGORY/m-p/2057995#M768836

https://community.powerbi.com/t5/Desktop/Calculate-Average-per-category/m-p/362637#M163818

Thanks for any help!

1 ACCEPTED SOLUTION
Microsoft Employee

You can use a measure expression like this.  You can use a slicer for the date range, or wrap it in a CALCULATE with a filter on date.

LocationAverage =
AVERAGEX (
DISTINCT ( Site[LocationName] ),
CALCULATE ( AVERAGE ( 'HydroVu Data'[value] ) )
)

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.

@mahoneypa HoosierBI on YouTube

4 REPLIES 4
Microsoft Employee

You can use a measure expression like this.  You can use a slicer for the date range, or wrap it in a CALCULATE with a filter on date.

LocationAverage =
AVERAGEX (
DISTINCT ( Site[LocationName] ),
CALCULATE ( AVERAGE ( 'HydroVu Data'[value] ) )
)

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.

@mahoneypa HoosierBI on YouTube

Frequent Visitor

Ah, Distinct was the key, perfect! Thank you!

Super User

can you put some dummy data here for more details

Did I answer your question? If so, please mark my post as a solution!

Proud to be a Super User!

Frequent Visitor

So averaging every row is 992.22, but what I want is an average of the averages for SensorName, which is 992.87.

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Join our Community Sticker Challenge

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors