+ Reply to Thread
Results 1 to 10 of 10

Querying linked tables to create a pivot table

  1. #1
    Registered User
    Join Date
    09-28-2017
    Location
    Germany
    MS-Off Ver
    2010 Pro
    Posts
    5

    Querying linked tables to create a pivot table

    Hi Forum!

    I want to create a pivot table with slicers to display turnover and revenue.
    I have 2 worksheets each containing a table linked via ODBC from our ERP (MSSQL) in an Excel 2010 Workbook.

    Problem
    One of them contains all the details of sales for the pivot table, however it contains only 1 field which identifies the customer responsible for the sale and that is customer number.
    Obviously the customer number is not ideal for a user to select a specific customer in a filter or slicer.

    The other table contains all of the customer contact data including the customer number and so-called "short name" in the form "Smith Industries, Berlin".
    I would like to use the field "short_name" in the pivot filter (or in another slicer) to select the desired data as it's much more descriptive than a customer number.

    How would an expert go about solving this?

    Thanks for your time and consideration!!

    Nick

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Querying linked tables to create a pivot table

    Any chance for desensitized example Excel file?

  3. #3
    Registered User
    Join Date
    09-28-2017
    Location
    Germany
    MS-Off Ver
    2010 Pro
    Posts
    5

    Re: Querying linked tables to create a pivot table

    #sandy666
    Thanks for the quick reply!
    I am away from the office at this time, however I'll try to construct a simple copy tomorrow.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Querying linked tables to create a pivot table

    no problem

  5. #5
    Registered User
    Join Date
    09-28-2017
    Location
    Germany
    MS-Off Ver
    2010 Pro
    Posts
    5

    Re: Querying linked tables to create a pivot table

    #sandy666
    Ok, That took a bit longer than expected - Sorry!

    I have recreated the problem in the attached workbook, I believe that is sufficent to demonstrate what's needed.

    (I don't know if it's relevant, but as I said in the opening thread the data tables in the real Workbook are ODBC Linked tables from our ERP Package. Is that relevant?)
    Attached Files Attached Files

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Querying linked tables to create a pivot table

    Your ODBC blabla Stats doesn't contain all Cust_No from ODBC blabla Address, so you will see only one (in this case).
    Your tables should update automatically if you get new data from ERP. After update tables , refresh Pivot Table (right click on PT and select Refresh)

    You need to check by yourself because I have no chance to do it with ODBC and ERP
    I assumed that each table always has the same number of columns
    I used formula for new column K (Trans) in K2 on ODBC blabla Stats tab:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for Excel Table it looks a little different
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is that what you want?

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.
    Attached Files Attached Files
    Last edited by sandy666; 10-05-2017 at 02:23 AM. Reason: file updated

  7. #7
    Registered User
    Join Date
    09-28-2017
    Location
    Germany
    MS-Off Ver
    2010 Pro
    Posts
    5

    Re: Querying linked tables to create a pivot table

    Thanks for your time!!
    That certainly is going in the right direction. (I wasn't sure if I could put formulas in a Sheet with linked tables. I thought the trick would have been to somehow reconfigure the slicers.)
    I replaced the wrong customer number in the stats table with 22025 and notice it returns "Short_Name" (the table header name) instead of the correct entry which should be "Smith Transponders, Berlin" and the Cust_Num" 21360 returns "Smith Transponders, Berlin" instead of "Overland Transformers, Bonn". So it's returning a result from 1 line above the result it should return, how could I correct this?
    Attached Files Attached Files

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Querying linked tables to create a pivot table

    Quote Originally Posted by Nick_Ellis View Post
    I wasn't sure if I could put formulas in a Sheet with linked tables.
    Why not? If there is/are empty/blank cells you can put there any formula or even a big smile But not there where will be any data from ODBC in the future.

    =INDEX(Tabelle2,MATCH([@[Cust_No]],Tabelle2[Cust_No],0),6) don't drag it, just put into first cell ie. K2 in this case. Table will do everything insted of you

    I decided to delete longer formula
    Attached Files Attached Files
    Last edited by sandy666; 10-05-2017 at 09:48 AM.

  9. #9
    Registered User
    Join Date
    09-28-2017
    Location
    Germany
    MS-Off Ver
    2010 Pro
    Posts
    5

    Re: Querying linked tables to create a pivot table

    Excellent!! Thanks a lot once again for your time, all is good and I got to learn something today!!
    Kind regards... Nick

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Querying linked tables to create a pivot table

    You are welcome

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.

+ 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. [SOLVED] Power Pivot Linked Tables Refresh
    By habsfan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2016, 10:09 AM
  2. pivot tables seemed to be linked
    By sthshrmags in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-09-2014, 04:54 AM
  3. Linked Pivot Tables
    By Pony08 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-15-2014, 08:10 AM
  4. Pivot tables not showing linked entries
    By Mr Bee in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-08-2014, 08:48 AM
  5. Replies: 0
    Last Post: 03-21-2012, 08:58 AM
  6. Pivot tables linked into SQL Database
    By kosciosco in forum Excel General
    Replies: 0
    Last Post: 07-06-2007, 07:20 AM
  7. Renaming Cells linked to Pivot Tables
    By gsimmons2005 in forum Excel General
    Replies: 2
    Last Post: 09-13-2005, 10:51 AM

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