Distinct SUM of repeated values for Group and Region

zapppsr

Board Regular
Joined
Aug 19, 2010
Messages
189
Hi guys, thanks for taking your time to help me. I always find good answers here.

I need a measure or calculated column that can take one Region, see how many different groups are there and sum the Group% but only one time.


The Group % repeats for product, that's why a simple SUM will not suffice.


You can download a Spreadsheet with the model here.


averagesum.png
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi, Matt Allington thanks for replying!!

In order to achieve my goal, I got some hints from here

Although, the solution was not complete for my scenario.

He proposed to create 2 measures:

AverageValue:=CALCULATE(AVERAGEX(FILTER(fProducts;[Group %]<>0);[Group %]))

SUMDistinctGroupPR:=CALCULATE(SUMX(DISTINCT(fProducts[Group]); [AverageValue]);ALL(fProducts);VALUES(fProducts[Region]))

The red part I added myself. That way it worked like a charm. Here is the file with solution.

dssol.png
 
Upvote 0

Forum statistics

Threads
1,215,992
Messages
6,128,170
Members
449,429
Latest member
ianharper68

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