+ Reply to Thread
Results 1 to 5 of 5

creating dynamic chart - & changing time periods based on todays date

  1. #1
    Forum Contributor
    Join Date
    06-19-2013
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    167

    creating dynamic chart - & changing time periods based on todays date

    Hi

    I wanted to ask how feasible you think this idea is:

    Im looking to build a dynamic chart for daily data in our shop.
    I want to see the data as a daily value for the whole year (but max set this to 28 days)
    I would like to then have it dynamic so i can change the graph based on what time frame i want to see from todays date (eg the preceeding: 7 days, 10 day, 14 days, 21 days, 28 days) with a little button to make it automatic

    also i would like the graph to stay the same size (so the days just fit in the same graph)

    thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: creating dynamic chart - & changing time periods based on todays date

    Are you still using Excel 2019?



    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    06-19-2013
    Location
    United Kingdom
    MS-Off Ver
    365
    Posts
    167

    Re: creating dynamic chart - & changing time periods based on todays date

    Hi.

    No i am on the latest excel. i will try to update that now, as that isnt correct on my profile

    Ive attached the document for the product & the shop number.

    Im looking to build a dynamic chart for daily data in each of the shops.
    I want to see the data as a daily value for the whole year (but max set this to 28 days)
    I would like to then have it dynamic so i can change the graph based on what time frame i want to see from todays date (eg the preceeding: 7 days, 10 day, 14 days, 21 days, 28 days) with a little button to make it automatic

    also i would like the graph to stay the same size (so the days just fit in the same graph)

    Any advice would be greatly received
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,319

    Re: creating dynamic chart - & changing time periods based on todays date

    Perhaps this will help.
    1. Add a column (B) to the data on the Raw Data Fruit & Shops sheet populated using: =IF(LEFT(C3,4)<>"shop",C3,B2)
    2. Change the column headers for columns B:C to Fruit and Shop respectively
    3. Convert the data on the Raw Data Fruit & Shops sheet into an Excel table
    4. From the Data tab utilize the From Table/Range feature
    5. Use the following editor code to produce the table seen in columns A:D on Sheet1:
    Please Login or Register  to view this content.
    6. From the new table produce a pivot table
    7. From the Days(Date) cell (F3) select the sort/filter button and then select Date filters > between to get the start and end dates you wish to evaluate
    8. From the pivot table produce a chart
    Note that in the attached file I had to filter the dates (before 6/26/2024) and the shops (1 and 2 only) in order to produce a file small enough to upload.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,805

    Re: creating dynamic chart - & changing time periods based on todays date

    Administrative Note:

    Is your forum profile showing the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. help creating a table with a dynamic pie chart based on date
    By smitchel070 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-02-2020, 01:07 PM
  2. Changing Cell Color Based Date and Time That Is Dynamic
    By fearglow in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2020, 08:13 AM
  3. Creating chart for missing periods of time
    By IgorDe in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-14-2019, 09:08 AM
  4. [SOLVED] Creating a Dynamic Chart that shows from Today for 100 days forward, changing daily
    By Robbie8 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-26-2016, 08:13 PM
  5. How to define chart range based on todays date
    By dan162 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-16-2014, 11:37 AM
  6. Creating dynamic userform based on several file names and creating chart overlays
    By Thorn23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2014, 12:09 PM
  7. [SOLVED] Solving Large function for dynamic data based on changing periods
    By Darren_Rix in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2013, 04:59 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