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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to calculate an average of a measure

Hello, 

 

I want to calculate an avarage of a measure that I calculated before. 

How can I do it? 

 

This is the measure:

Orders Report-Treated Customers Percentage% =
var Customers_Made_Order = [Total Unique Customers That Made An Order]
var Customers_With_UsSale = [Total Unique Customers with UpSale]
var Cus_Percentage = DIVIDE(Customers_With_UsSale,Customers_Made_Order)
return Cus_Percentage
 
I want to calculate an average for Cus_Percentage. 
In my report I show daily Cus_Percentage and in the end of the month \ during the month I want to show the average Cus_Percentage.
 
Any suggestions? 
Thanks
 
6 REPLIES 6
MohamedFowzan1
Responsive Resident
Responsive Resident

Hi 
Try this
AVERAGEX(
SUMMARIZE('YourTable', 'YourTable'[Employee_Number], 'YourTable'[Customer_Key]),
[Orders Report-Treated Customers Percentage%]
)

Syndicate_Admin
Administrator
Administrator

You can create a new measure by using the AVERAGEX function to calculate the daily average of your measure Cus_Percentage in the context of the month. For example:

Promedio Cus_Percentage Mes =
AVERAGEX(
    VALUES('Tabla'[Fecha]),
    [Porcentaje de clientes tratados con informes de pedidos %]
)

This will loop through each day of the month shown, take the daily value of Cus_Percentage, and calculate the average to display in your monthly visualization.

Anonymous
Not applicable

Hi @Anonymous 

Do you want to show the average of Cus_Percentage by Month? Here I build a sample to have a test.

Try this measure:

Avg of Percentage% = AVERAGEX('Table',[Orders Report-Treated Customers Percentage%])

Build a visual by Year column and Month column.

1.png

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello RicoZhou 🙂

 

If In need to create monthly AVG measure for employee and customer level, how can i solve it? 

I tried to use the query you mentioned in you answer but it didnt work for me. 
I the report i don't need to show months - only the calculations. 

I built a visual with the following columns:

employee_ID, Customer_Key, Original_amount_defacto, UpSale_Amount, Delivery_month.

and used your measure. 

 

KatyaK_0-1631189515893.png

 

Greg_Deckler
Community Champion
Community Champion

@Anonymous This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Grag, 

 

What is the difference between [YourMeasure] and [Measure], because i'm not realy sure what to add. 

for example here:

AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors