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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
cristianml
Post Prodigy
Post Prodigy

Average of a Measure

Hi,

 

I need to callculate an average of a Measure.  It the following screen should be  46/47  but not 52

I tried with a formula that you see there but didn't work. 

My measure is the one called "Actual HC"

 

 

Actual HC = CALCULATE(DISTINCTCOUNT('Resource Actual'[Name]),FILTER('Resource Actual','Resource Actual'[Category]="Hours" && 'Resource Actual'[Quantity]>8))

 

AVERAGE.png

Any ideas ?

 

Thanks

 

1 ACCEPTED SOLUTION

Ooops, sorry, I forgot that we were working with a measure already. You will need to use AVERAGEX with the <table> parameter identifying your Year-Month column. I think the following will work, but if not, let me know.

 

AVERAGEX( VALUES( 'YourDateTable'[Year-Month]), [Actual HC] )

 

where 'YourDateTable' is your date table and [Year-Month] is the column in your date table with the year-month.

 

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

View solution in original post

5 REPLIES 5
RandyPgh
Resolver III
Resolver III

Please share the DAX for [Actual HC].

 

 

Hi @RandyPgh ,

 

Follow :

 

Actual HC = CALCULATE(DISTINCTCOUNT('Resource Actual'[Name]),FILTER('Resource Actual','Resource Actual'[Category]="Hours" && 'Resource Actual'[Quantity]>8))
 
regards

Your illustration in the original post shows the spinners in the top-left of each visualization. This means that they are still loading. Assuming that they look the same after the spinners complete, you would need to change the Average calculation to be 

 

Average of resource = AVERAGE( [Actual HC] )

 

Then put this "Average of resource" measure into the Field of the card visualization instead of the current "Actual HC". That should change the 52 to a 45.5 (if visualized with decimals).

Hi @RandyPgh ,

 

Is not working: 

 

ERROR.png

Ooops, sorry, I forgot that we were working with a measure already. You will need to use AVERAGEX with the <table> parameter identifying your Year-Month column. I think the following will work, but if not, let me know.

 

AVERAGEX( VALUES( 'YourDateTable'[Year-Month]), [Actual HC] )

 

where 'YourDateTable' is your date table and [Year-Month] is the column in your date table with the year-month.

 

https://docs.microsoft.com/en-us/dax/averagex-function-dax

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.