+ Reply to Thread
Results 1 to 12 of 12

Refresh data source (excel table) in power pivot

  1. #1
    Registered User
    Join Date
    01-02-2018
    Location
    Oslo, Norway
    MS-Off Ver
    2010/2017
    Posts
    20

    Refresh data source (excel table) in power pivot

    Hi,
    I am having trouble refreshing the data source in power pivot. Currently, I have a table in an excel worksheet that I use in Excel's data model. I assumed I could go to the power pivot view and click "refresh" to update the data model if I add additional rows to the source table. However, the number of rows won't update even if I click "refresh" and excel says it was updated successfully.

    If I change some of the existing data in the table (without adding new rows), this will be updated when I click refresh.

    I'm using Excel 2016.

    Does anyone know what I should do to get the number of rows updated?

    Best regards,
    Maagnus
    Last edited by maboho93; 06-08-2018 at 04:13 AM.

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Refresh data source (excel table) in power pivot

    Is the data source actually a table? ie. a table name not a range?

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

    Re: Refresh data source (excel table) in power pivot

    if you want to use all features of DataModel and PivotTable your source data should be an Excel Table
    if you add Range to DataModel it will change to Excel Table automatically
    if you add Range to DataModel via PivotTable your source will stay as Range so ... useless for PivotTable and Data Model
    Last edited by sandy666; 06-08-2018 at 01:52 AM.

  4. #4
    Registered User
    Join Date
    01-02-2018
    Location
    Oslo, Norway
    MS-Off Ver
    2010/2017
    Posts
    20

    Re: Refresh data source (excel table) in power pivot

    I have double checked that the source is a table. I have selected the whole range and inserted a table.
    Later on, I added two additional rows (I checked in the name manager that these two rows got added to the table.)

  5. #5
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Refresh data source (excel table) in power pivot

    Can you attach a small sample workbook showing the problem?

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

    Re: Refresh data source (excel table) in power pivot

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    @kersplash
    Death Race

  7. #7
    Registered User
    Join Date
    01-02-2018
    Location
    Oslo, Norway
    MS-Off Ver
    2010/2017
    Posts
    20

    Re: Refresh data source (excel table) in power pivot

    Hi all,
    Before I upload a sample workbook, I have a theory:

    I have a macro which updates the table (source for the data model) automatically. When the table is updated, the old one is deleted with usedrange.clearcontents and a new one is generated. Can this procedure be the reason why my data model won't update?

  8. #8
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Refresh data source (excel table) in power pivot

    Try deleting the code and see what happens I guess. Hard to say without seeing it.

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

    Re: Refresh data source (excel table) in power pivot

    I think comment whole code not delete

  10. #10
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Refresh data source (excel table) in power pivot

    Quote Originally Posted by sandy666 View Post
    I think comment whole code not delete
    That is the intended meaning.

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

    Re: Refresh data source (excel table) in power pivot

    Quote Originally Posted by kersplash View Post
    That is the intended meaning.
    I forgot to add: that is what kerspash want to say

  12. #12
    Registered User
    Join Date
    01-02-2018
    Location
    Oslo, Norway
    MS-Off Ver
    2010/2017
    Posts
    20

    Re: Refresh data source (excel table) in power pivot

    Hi again,
    The problem was the VBA code that deleted the table before recreating it. Thank you for all your answers

+ 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. Automatic Refresh of a pivot Table with External data source
    By AnnaLioce in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2016, 07:55 AM
  2. Auto-Refresh Pivot Table When Source Data Refreshes
    By XLINT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2015, 11:00 AM
  3. Automatically refresh source data in Power Pivot Window
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2015, 11:49 AM
  4. Can't Refresh Pivot Table When Using External Data Source
    By yenping.fu in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-02-2014, 06:24 AM
  5. Replies: 0
    Last Post: 08-14-2013, 06:31 AM
  6. Macro to refresh pivot table and update data source
    By TBO in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 01:09 PM
  7. Replies: 0
    Last Post: 03-09-2009, 09:53 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