PowerPivot: Complicated aggregation

Mer333

Board Regular
Joined
Jun 28, 2014
Messages
54
Hi everyone!

I just stuck against an unusual task...

I have a table like:

[table="width: 500, class: grid"]
[tr]
[td]Market[/td]
[td]Category[/td]
[td]Week[/td]
[td]Amount of SKU[/td]
[/tr]
[tr]
[td]US[/td]
[td]Cars[/td]
[td]5[/td]
[td]1[/td]
[/tr]
[tr]
[td]Africa[/td]
[td]Cars[/td]
[td]7[/td]
[td]3[/td]
[/tr]
[/table]

So the problem here is that I need an aggregation where:
1) SUM Amount of SKU inside every week and every market.
2) AVERAGE First step for every category.

Any ideas? I tried some "X" functions but didn't succeed yet.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You were definately on the right track w/ X functions. You are looking for someting like:
=AVERAGEX(VALUES(Calendar[WeekNumber]), [Amount of SKU])

But it's really hard to say exactly without seeing more of the tables/model. But AverageX is totally your guy.
 
Upvote 0
OMG... It seems I did it... I will continue investigate but at first sight it works!

AVERAGEX(VALUES(Table[Market]),AVERAGEX(VALUES(Table[Week]),SUM(Table[Amount of SKU])))
 
Upvote 0
Very interesting clarification...

SUM(Table[Amount of SKU]) should be a separated measure... or it doesn't work.

Anyone knows why?
 
Upvote 0

Forum statistics

Threads
1,224,074
Messages
6,176,216
Members
452,715
Latest member
DebbieCox

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