Average of Group, not per item

zapppsr

Board Regular
Joined
Aug 19, 2010
Messages
189
Hi.

I have some data that is organized like this:

Group 1 - Jan - Type 1 = 100
Group 1 - Feb - Type 1 = 100
Group 1 - Jan - Type 2 = 10
Group 1 - Feb Type 2 = 10

The Average of Type 1, is 100. The Average of Type 2, is 10. The Average of all, regardless type, is 55.

Now, if I sum the data by group, I will have 110 in Jan and 110 in Feb, which gives me the Average of 110 for the sum of the group.

I have this measure in Power Bi: MetaM = AVERAGE('Produção Fisica'[Total Meta]). This results in 55, because it is calculating the average of the items in Group 1.

[Total Meta] is calculated on the type level.

I want a measure that gives me 110, which is the average of the sum of the items in the group.

Can it be done?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
average of the sum of the items in the group.

Maybe this? Didn't totally get the ask here... :(
=AVERAGEX(VALUES(MyTable[GroupField]), CALCULATE(SUM(MyTable[ValueField])))
 
Upvote 0
Thank you very much for answering scottsen . I gave it a try right now, but instead of getting the average of the group, I'm getting the sum. Probably because the last part of the expression.
You said you did't understand well what I was asking... let me put this way:

The data is:

Group 1 - Jan - Type 1 = 100
Group 1 - Feb - Type 1 = 100
Group 1 - Jan - Type 2 = 10
Group 1 - Feb Type 2 = 10

But I want to calculate as if it was like this:

Group 1 - Jan - = 100
Group 1 - Jan - = 10
Group 1 - Feb - = 10
Group 1 - Feb - = 100

Jan 110, Feb 110, Average = 110

Its like ignoring the type and sum by the group.

Looking at your solution I though it would work, but the averagex encapsulating the rest is not making an average but a sum.

I hope I was able to explain better now.
 
Upvote 0
Ya, I still like my measure. SUM some stuff together, than Average them.

What does your measure actually look like?
=AVERAGEX(VALUES(MyTable[Months]), CALCULATE(SUM(MyTable[ValueField])))
 
Upvote 0

Forum statistics

Threads
1,225,562
Messages
6,185,672
Members
453,314
Latest member
amitojsd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top