PowerPivot Equivalent of SUMIF()

bauer24

New Member
Joined
Jan 12, 2009
Messages
23
Hi all,

I'm trying to recreate a sumif() formula in PowerPivot but having no luck at all. Does anyone know the correct way to do this?

For example, I might have two columns. First column (Name) shows a pupil's name, the second column (Score) shows their test mark. I'd like to make a third column that shows the aggregate of their scores. This would be very easy using sumif() but I can't figure out how to do it using the calculate() of filter() functions.

Name,Score,NEW
Jack,10,14
Nina,11,19
Kim,1,5
Jack,4,14
Kim,4,5
Nina,8,19
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
What exactly is the reason you need the extra column for? Do you need it in a calculation afterwards?
If you just build a PivotTable it calculates it perfectly for you. Or you could try and define a measure?
 
Upvote 0
What exactly is the reason you need the extra column for? Do you need it in a calculation afterwards?
If you just build a PivotTable it calculates it perfectly for you. Or you could try and define a measure?

Hi Nicky,

I need it in the PowerPivot environment for use in another variable I'm creating later on. I'm trying to assign a value weighted on the percentage of scores.

So if the starting data was

David,20
David,30
David,10

I'd make this new metric that has the total for "David"

David,20,60
David,30,60
David,10,60

and then I can calculate the %

David,20,60,0.33
David,30,60,0.50
David,10,60,0.17
 
Upvote 0
You can just make a calculated column like
=calculate(Sum(Score[Score]), ALLEXCEPT(Score, Score[Name]))
Where Score is the table name

forumvm.png


Cheers,

Jason



 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,204
Messages
6,177,131
Members
452,761
Latest member
Yukun

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