Excel 2010 Pivot Table: show unique occurrances

Katrin620

New Member
Joined
Oct 28, 2013
Messages
4
Hi everyone,

I have been trying to solve this problem for weeks and have not been able to find a solution.
I hope someone might have an idea that has escaped me. I have searched through old posts but cannot find a solution.

I am using Excel 2010 on a computer running Windows 7.

I have an extensive table which lists all information regarding trainings that are run at a company.
It includes many more fields than I have included below, but I hope this can demonstrate the problem.
The table feeds several pivot tables which provide statistics and forecasts.

I am trying to create a pivot table which shows scheduled training (training status: 'scheduled').
I have been able to create one which shows scheduled trainings, in a monthly format, like a calendar,
but it shows participant number, not unique trainings.

How can I show unique trainings?

I have read I could do this by making an extra column, and then counting unique values, but i canno think of any way
to create such values that are unique for each training yet are the same for all participants of one particular training.
The problem is that several trainings can run at once, even for the same topic. There can he between 1 and 6 participants per training.

ParticipantTrainingTraining StatusTraining StartTraining End
John JonesTopic 1Scheduled01.10.201405.10.2014
Tim JamesTopic 2waiting list
Tom MichaelsTopic 2Completed01.04.201405.04.2014
Dawn MarksTopic 3waiting list
Tim JamesTopic1Scheduled16.12.10421.12.2014
Jeff NicholsTopic 1Scheduled01.10.201405.10.2014
Dawn MarksTopic 1Scheduled16.12.10421.12.2014

<tbody>
</tbody>

I would appreciate any advice.

Kind regards,
Kat
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi Kat and Welcome to MrExcel,

Could you post a small screen shot of your desired result?

Is it correct that a unique scheduled training occurrence would be one that has a unique combination of values in the fields: Training, Training Start, and Training End (along with Training Status="Scheduled")
 
Upvote 0
Hi Jerry,

here is a screenshot of the table as it is now and below an explanation of how I would like it to appear:

33xaqdv.png

Currently the numbers shown are the individual participants and not the unique trainings (i.e. it should be 1 training in Location 2 in August, one in September, and 2 in October. Total for that location: 4).

I have made a column into my table which combines a lot of the information, and I am now certain it is unique, but still cannot find a way to process this further.

Generally I am not slow on the uptake but this one really has me stumped!

Thanks so much and kind regards,
Kat
 
Upvote 0
Kat, You could use a formula like the one shown in F2 to accomplish that objective.

Place field "Sum of UniqueCount" in the Values area of your PivotTable.


Excel 2013
ABCDEF
1ParticipantTrainingRequest StatusTraining StartTraining EndUniqueCount
2Tom MichaelsLocation 1Scheduled01.04.201404.04.20141
3John JonesLocation 1Scheduled01.10.201404.10.20141
4Dawn MarksLocation 1Scheduled20.12.201423.12.20141
5Dawn MarksLocation 1Completed04.01.201407.01.20140
6Tim JamesLocation 1Scheduled16.12.201419.12.20141
7Dawn MarksLocation 2waiting list0
8Dawn MarksLocation 2Scheduled01.10.201404.10.20141
9Jeff NicholsLocation 2Scheduled01.10.201404.10.20140
10Tim JamesLocation 2Scheduled01.10.201404.10.20140
Sheet1
Cell Formulas
RangeFormula
F2=IF(COUNTIFS(C$1:C2,"Scheduled",B$1:B2,B2,D$1:D2,D2,E$1:E2,E2)=1,1,0)


If you have some familiarity with SQL, another approach would be to use a query to aggregate unique trainings, then use the result of that query as the PivotTable data source. That method has the benefit of not requiring a helper column in your data source range.
 
Upvote 0
Hi Jerry,

ok this works, but only if the excel file is sorted by training status.
Is there any way to make this work even if the table is not sorted?

I wish I could could show the original table, but I would need to black out so much data that it would'd help.
I have 23 columns but that shouldn't matter I hope.

Thank you for your help and wishing you a relaxing weekend,
Kat
 
Upvote 0
ok this works, but only if the excel file is sorted by training status.
Is there any way to make this work even if the table is not sorted?

Kat, It works regardless of whether the data is sorted. The formula marks the first unique combination of fields Training, Start and End where Status = "Scheduled".

The number of columns in your data source shouldn't matter, provided you aren't using filters other than the ones you show in Post #3. The approach would break down for example if you were applying a filter for Business = "Business A" because the first record for that unique training might be for "Business B".
 
Upvote 0
I guess that would be why it isn't working then. The table is constantly filtered by valious criteria depending who is looking at it and for what reason.
I think I am giving up! Have spent way too much time on it.
Thanks for the suggestions.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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