+ Reply to Thread
Results 1 to 5 of 5

Showing other data in Pivot Table

  1. #1
    Registered User
    Join Date
    03-04-2022
    Location
    Danville, CA
    MS-Off Ver
    365
    Posts
    2

    Showing other data in Pivot Table

    I have created a pivot table from a tab with sales data. I have the sales reps' names in the Rows area of the pivot table and I have fields in the Values section counting the number of transactions each rep was involved in and the average price of each sale. I am happy with the result of these calculations, but I also want to include in the pivot table the sales reps' phone number, email etc. so I can print out a report with the sales reps' name, contact info, and sales info from the pivot table. The reps' phone #, email, etc. are columns in the same source data tab where the reps' names and sales data is located. How can I have this info displayed within the pivot table for each rep? Thank you in advance for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Showing other data in Pivot Table

    Hi,

    Not sure why Nancy Lim, for example, has different entries for her phone number? In any case, you'll need to add your data to the Data Model and recreate your Pivot Table using Power Pivot, with the following two measures:

    PHP Code: 
    Email :=
    VAR 
    ThisSalesRep =
        
    MINMLS_Data[Sales Rep] )
    RETURN
        
    CALCULATE(
            
    MINMLS_Data[E-mail] ),
            
    FILTER(
                
    MLS_Data,
                
    MLS_Data[Sales Rep] = ThisSalesRep
                    
    && MLS_Data[E-mail] <> ""
            
    )
        ) 
    PHP Code: 
    PhoneNumber :=
    VAR 
    ThisSalesRep =
        
    MINMLS_Data[Sales Rep] )
    RETURN
        
    CALCULATE(
            
    MINMLS_Data[Phone Number] ),
            
    FILTER(
                
    MLS_Data,
                
    MLS_Data[Sales Rep] = ThisSalesRep
                    
    && MLS_Data[Phone Number] <> ""
            
    )
        ) 
    which can then be dragged into the Values area of the Pivot Table.

    These could be greatly simplified were there no duplicate entries in those columns, i.e., in your case, duplicate blanks.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,922

    Re: Showing other data in Pivot Table

    It would be a lot simpler just to add them in as row fields before the value fields?
    Rory

  4. #4
    Registered User
    Join Date
    03-04-2022
    Location
    Danville, CA
    MS-Off Ver
    365
    Posts
    2

    Re: Showing other data in Pivot Table

    Thanks XOR LX. When I paste in the code for Email to create a measure I am getting the error that I need to "Add an equal sign to the beginning of this formula."

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Showing other data in Pivot Table

    If you're entering the measures via the Calculation Area in the Power Pivot window then you can paste the formulas precisely as I give.

    If instead you're entering them via the Power Pivot tab (Measures/New Measure) in the Excel window then you exclude the name part (for example, "Email :=") when you enter the formula into the box.

    Regards

+ 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. Multiple pivot charts showing different data for same pivot table
    By gwood97 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-06-2019, 06:07 PM
  2. Pivot table not showing data
    By venkiatmaruthi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-18-2016, 11:53 AM
  3. [SOLVED] Pivot Table- Data no longer in table source still showing
    By Smally in forum Excel General
    Replies: 7
    Last Post: 09-10-2014, 11:23 AM
  4. Data not showing in pivot table
    By 4am in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-27-2013, 06:06 PM
  5. Pivot Table not showing all data
    By jmcole in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-27-2013, 08:29 PM
  6. [SOLVED] Pivot table not showing the row of data
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-23-2012, 04:27 PM
  7. Data not showing on Pivot Table
    By la_techie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2012, 06:28 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