Create Pivot Table When duplicate data is in two columns

JohnQPublique

New Member
Joined
Oct 10, 2017
Messages
4
I have spent a lot of time researching this topic and am coming here as a last resort. Thank you for reading.

A table is for loans and the reasons they were denied. The columns are as follows:

Loan#NarrativeReasonForDenial1ReasonForDenial2
1 xxxReason AReason B
2 xxxReason EReason A
3 xxxReason DReason B
4 xxxReason C
5 xxxReason B
1 xxxReason CReason A
2 xxxReason B
3 xxxReason A
4 xxxReason AReason E
5 xxxReason BReason D

<colgroup><col span="2"><col><col></colgroup><tbody>
</tbody>

There is duplication-- loan numbers appear multiple times and the reasons for denial 1 and 2 are the same. The narratives need to be separate. There are multiple narratives for each loan and each narrative ties to one or two reasons for denial. The table is dynamic and information may be added or deleted depending on bosses review, so the pivot table needs to be dynamic. I am trying to come up with a pivot table the gives the following:

Loan# Reason A Reason B Reason C Reason D Reason E
1 2 1 1
2 1 1 1
etc...

How do I accomplish this??? I have PowerPivot built into and functioning in Excel 2013. Please help. Thank a lot.

JohnQ
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Not sure how to edit my post...
The resulting table should be:
Loan#Reason AReason BReason CReason DReason E
1211
211
1


<colgroup><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Boy, sorry to add, but I am also trying to get a count of UNIQUE reasons for the denial in the last column. There doesn't seem to be a way to total the non-blank cells in a row in a pivot table. Can anyone help here also?
 
Upvote 0
You need to Unpivot the data, which can be done with the PowerQuery(2013 ProPlus) or Get and Transform(Excel 2016) functions.
There are other solutions for unpivot too.
You can then use the Data Model to get to a unique count but you can't mix the count and unique counts elegantly. They're both available.
 
Upvote 0
What type of data populates the Narrative field?

Spiller BD, the narrative section contains text. Sometimes many sentences explaining the issue at hand and why the loan was denied. Because each narrative has different issues, the narratives need to be separate, and thus the problem.

Thanks for the time. Please let me know any answers. I am researching the unpivot suggestion.
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,941
Members
449,480
Latest member
yesitisasport

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