Count of occurrences within PowerPivot

grahamross87

New Member
Joined
Apr 24, 2014
Messages
5
Hi,
I've been looking all over for an answer to what I thought would be a fairly straight forward question, but not been able to find anything.
To give a bit of context, I'm looking to add a column which allows me to filter my pivot table by customers that have booked 1, 2, 3 etc. times each year.
In order to do this, I'm looking to just get a count of the number of times the value in my 3rd column (CustID & BkngYr Merged) occurs. The output I'm hoping to get is in my "Count" column, but I can't find the correct formula to get to this.
Any help would be really appreciated.
Thanks

[TABLE="width: 336"]
<tbody>[TR]
[TD]CustomerID[/TD]
[TD]BookingYr[/TD]
[TD]CustID & BkingYr Merged[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]1000347[/TD]
[TD]Yr6[/TD]
[TD]1000347Yr6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1000347[/TD]
[TD]Yr6[/TD]
[TD]1000347Yr6[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1000348[/TD]
[TD]Yr6[/TD]
[TD]1000348Yr6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1000348[/TD]
[TD]Yr6[/TD]
[TD]1000348Yr6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1000348[/TD]
[TD]Yr6[/TD]
[TD]1000348Yr6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1000348[/TD]
[TD]Yr6[/TD]
[TD]1000348Yr6[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1000351[/TD]
[TD]Yr6[/TD]
[TD]1000351Yr6[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
For a calculated column, something like this:

=CALCULATE(counta(Table1[CustomerID]),Table1[CustID & BkingYr Merged]=earlier(Table1[CustID & BkingYr Merged]))

should work.
 
Upvote 0
That's odd as it works for me with your sample data, returning exactly the values you show. Can you put a workbook somewhere for review? (SkyDrive/Dropbox/etc)
 
Upvote 0
It shouldn't - that's what I tested with. Which version of PP was it?

Edit: I've put my sample file on SkyDrive here: http://1drv.ms/1iik1qN
 
Last edited:
Upvote 0
It's definitely a version issue. I opened your file, upgraded the PP data, copied your formula, deleted the column you had added and added a new one pasting in the same formula, and it calculated as you want it to. Unfortunately, I don't know offhand how to make it work in the old version of PP - I presume you can't upgrade?
 
Upvote 0
Ok that would make sense. I'll get onto our IT bods and see if they can upgrade my version.
Really appreciate your help, thanks!
 
Upvote 0
Good luck!

Glad to help - and welcome to the forum, by the way. :)
 
Upvote 0

Forum statistics

Threads
1,223,993
Messages
6,175,838
Members
452,675
Latest member
duongtruc1610

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