+ Reply to Thread
Results 1 to 6 of 6

Power Pivot source Data File name changes

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,716

    Power Pivot source Data File name changes

    I import data from our main data base but when the file is exported it puts a date at the end of the file each time it is exported


    I use Power Pivot to import the data.

    How do I do a refresh the data when the source data file name is not the same when exporting the next day for eg today source file is ales report_09/07/2019 tomorrow is is Sales Report_10/07/2019 ?
    Last edited by Howardc1001; 07-09-2019 at 07:41 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,427

    Re: power Pivot Query

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,716

    Re: Power Pivot source Data File name changes

    Hi Ali


    Thanks for your advise. I have amended the title to a more appropriate title

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Power Pivot source Data File name changes

    There are several ways to handle this. But first, I'd recommend that you don't query/connect to source file directly from PowerPivot data model wizard.

    Instead, leverage Get & Transform (PowerQuery) to import data, perform transformation and then load to data model.

    This will ensure that data conforms to model's need and ensures consistency of DAX calculation results.

    Think of PQ as ETL tool.

    Now to deal with date change. There are several ways to do it.

    1. Use PQ's 'M' query language to construct file name string dynamically. To get date using PQ...
    Please Login or Register  to view this content.
    This will generate string "09/07/2019" for today (Jul 09, 2019).
    You can then concatenate it to static portion to create query string.

    2. Perform calculation in Excel sheet and assign it to Named range. Then pass that on to PQ.
    Say in A1 of some sheet, add following formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Name the cell as 'lDate' using Name manager.
    Then in Advanced editor of PQ, use following line to pass the value.
    Please Login or Register  to view this content.
    Then again, use it to construct your string.

    There are other methods, but above two would be easiest to set up and maintain.

    If you need further help in implementation. I'd recommend that you upload sample source file and sample out put file.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,716

    Re: Power Pivot source Data File name changes

    Thanks for the help, much appreciated

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,882

    Re: Power Pivot source Data File name changes

    You are welcome

+ 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 does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  2. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 04:09 PM
  3. Power Query and Power Pivot Table
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 06:17 AM
  4. Power Query and Power Pivot Table !!
    By haitham.shop in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2018, 06:15 AM
  5. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-06-2018, 05:59 AM
  6. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  7. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 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