+ Reply to Thread
Results 1 to 6 of 6

Pivot Table with data from two worksheets

  1. #1
    Registered User
    Join Date
    08-13-2018
    Location
    Utah, USA
    MS-Off Ver
    2016
    Posts
    8

    Pivot Table with data from two worksheets

    Hello all,

    I am new to the forums, and fairly new to some of the complex features of Excel. I am currently trying to build a reporting tool for our group that shows the cycle time of our production, and the quality.

    The first part, cycle time, I have already built and automated via macros, because I only need 1 sheet of data for the pivot table.

    The concern I have is with quality, and I will provide as much detail as possible. Currently, I receive a spreadsheet with production (everything that we produced and sent out) and each has a 7-digit number associated with it. I run production using a count of this 7-digit number. The difficult part is that I receive a second spreadsheet that has a very similar format, but only lists the 7-digit numbers for the transactions that had errors. For example, if I had 10 transactions on my first spreadsheet for production, but only 1 had error, my error spreadsheet I receive would only have 1 transaction on it.

    What I need is the ability to have 1 chart that shows 1. A distinct count of "Credit_Lead_Num" from the error spreadsheet, 2. A count of "Credit_Lead_Num" from the production sheet, and 3. A percentage of the 2, displaying the accuracy. I added the error data sheet to my data model, which allowed me to get a distinct count, but when I add "Credit_Lead_Num" from the production sheet, it displays the same number for each month and a dialogue box pops up stating that a relationship needs to be formed. When I try to create the relationship, it will not allow me since both columns do not have unique values, due to the fact that each transaction on the error spreadsheet can have multiple errors.

    My questions are as follows:

    1. Because they are the same data field, but on 2 separate sheets, is what I am trying to accomplish even possible?

    2. If the answer to the above is yes, how do I create the relationship correctly?

    3. What additional data do you need to help answer this?

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Pivot Table with data from two worksheets

    I would just create a helper column on the production sheet, with a COUNTIF that counts up how many times the 7-digit number of that code, for that row in the helper column, occurs in range of 7-digit codes listed as defective on the quality sheet.

    More broadly, PivotTables cannot pull data from 2 different worksheets. It can be done with PowerPivot, which is a plugin, but that might be overkill if you could just get there with a simple helper column feeding a regular old PivotTable.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    08-13-2018
    Location
    Utah, USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Pivot Table with data from two worksheets

    I would like to use slicers for the data so that individuals can filter the data and self-serve for their KPIs. Is a helper column dynamic in that as I change the filters on the pivot, the helper column would change?

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Pivot Table with data from two worksheets

    The values in the individual cells in the helper columns would not change, but if you're adding the column to the existing table feeding into the PivotTable, then it would be sorted / filtered just like any other column would be.

    Can you attach a sanitized example of what you have? Then I could kick back a spreadsheet demonstrating the structure I'm thinking of.

  5. #5
    Registered User
    Join Date
    08-13-2018
    Location
    Utah, USA
    MS-Off Ver
    2016
    Posts
    8

    Re: Pivot Table with data from two worksheets

    Here is an example workbook. The production tab shows 9 production items and the error data shows 2 different transactions; 1 transaction with only 1 DR- error, and 1 transaction with 5 errors of various types.

    What I need to show is the number of transactions with DR- errors (2 in this case) against total transactions (9 in this case), and calculate an accuracy. From there, I can add a pivot chart and add slicers in to help each individual employee self-serve for their metrics.

    In further review, I found that the Record_Number is a more accurate field to use, so I would like to use that instead of Credit_Lead_Num as I previously stated.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,543

    Re: Pivot Table with data from two worksheets

    I believe that what Ben is suggesting is that you add a column for Errors (I) to 'Table 1' on the Production Data sheet. This column could be populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Beyond that I am not sure what you want. I suggest that you manually mock up the results that you would like displayed so that we may attempt to automate that output.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 02-20-2014, 11:49 AM
  2. Replies: 10
    Last Post: 01-08-2013, 04:03 PM
  3. Replies: 1
    Last Post: 03-05-2012, 09:15 AM
  4. Excel 2007 : Pivot table data from multiple worksheets
    By SueWithQuestion in forum Excel General
    Replies: 0
    Last Post: 10-10-2011, 07:45 AM
  5. Getting a Pivot table to use data from different worksheets
    By Research RN in forum Excel General
    Replies: 1
    Last Post: 12-08-2008, 05:46 PM
  6. [SOLVED] create pivot table with master/detail data from 2 worksheets
    By BarbaraT in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-17-2006, 06:35 PM
  7. [SOLVED] Consolidate data from several worksheets via pivot table
    By mthatt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2005, 10:07 AM
  8. [SOLVED] Consolidate data from several worksheets via pivot table
    By mthatt in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-23-2005, 03:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1