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
UK_User123456
Resolver I
Resolver I

Average Calculation

Hi All,

 

I have the below data, im just simply trying to do an average calulcation for each of the ID's that I have, normally I would have just put the "Amount" into the values field and used the average function, but it does not give me the average function to select, is there anothger way of doing this?

 

IDAmount
112
110
13
15
16
220
227
232
315
416
517
63
645

 

my outcome would be:

 

IDAmount
17.2
226.33333
315
416
517
624
1 ACCEPTED SOLUTION

@cosminc yeah. You can use the little down arrow there to change it to any other summarization type, such as average. Or of course write an explicit measure that does the same thing. Such as...

 

Avg Amount = AVERAGE(TableName[Amount])

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
cosminc
Post Partisan
Post Partisan

Hi

the column Amount is number type and Modelling - Default summarization is Sum?

 

Hope it helps,

Cosmin

 

@cosminc yeah. You can use the little down arrow there to change it to any other summarization type, such as average. Or of course write an explicit measure that does the same thing. Such as...

 

Avg Amount = AVERAGE(TableName[Amount])

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi All,

 

Thanks for the response, it just clicked to me after reading your responses that my amount for some reason when imported into power bi it changed the format to text when it should have been whole number which is the reason I couldnt summarise it.

 

Thanks

KHorseman
Community Champion
Community Champion

This is fairly easy in the Query Editor. Go to the Transform tab and use the Group By button. Group by your ID column and use sum of Amount as the aggregation type.

 

GroupBy Query Editor.png

 

That assumes you want a hard table with this aggregation pre-calculated. You can also do this in a report by either writing a measure that does an average of Amount, and just set that measure next to the ID column on your report page, or just drop the two columns side by side and set the aggregation on Amount to average, and ID to "do not summarize."





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.