+ Reply to Thread
Results 1 to 3 of 3

PowerQuery - change cells names each week

  1. #1
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    PowerQuery - change cells names each week

    hi,

    I am receiving sales volumes table each week. What I have to do, is to compare volumes from the current table vs last week table. Both tables' names are usually with a week number, but it does not matter here. I am able to check which is the latest based on modification date, but I cannot hard-code its names in PowerQuery, because I would have to update it every week.

    Is there any way to change the names of both files (or SourceNames) to: CurrentWeek and LastWeek?

    pls see the file attached - based table and final table
    Attached Files Attached Files

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

    Re: PowerQuery - change cells names each week

    Here is a thought about modifying the formulas to find the current and last week, providing that the current week's data is placed at the top of the Source table as shown in the sample file.
    For the Last Week column (H) use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For the Current Week column (I) use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    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.

  3. #3
    Forum Contributor
    Join Date
    10-14-2020
    Location
    Shanghai
    MS-Off Ver
    O365
    Posts
    156

    Re: PowerQuery - change cells names each week

    Hi,

    I loaded your source into PQ. Then I added the ISO Weeknumber for the current date, split the source name by delimiter W, subtract the current week from the source week and can then determine the current and the last week.


    Rest is easy.
    Attached Files Attached Files

+ 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. Status Change Week over Week in Data Dump
    By Alex9678 in forum Excel General
    Replies: 2
    Last Post: 05-30-2020, 02:15 PM
  2. [SOLVED] Week over Week change in pivot table
    By trisoldee in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-17-2017, 12:19 PM
  3. [SOLVED] Need help auto-updating a formula for week over week change
    By yanger87 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-14-2015, 12:45 PM
  4. Replies: 16
    Last Post: 05-21-2013, 06:35 AM
  5. Change week row every week with clear cells
    By adamsurpren in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2012, 11:45 AM
  6. Can I change the names of multiple cells at once?
    By shadestreet in forum Excel General
    Replies: 8
    Last Post: 05-30-2006, 08:00 PM
  7. Replies: 2
    Last Post: 06-18-2005, 07:05 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