+ Reply to Thread
Results 1 to 17 of 17

Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

  1. #1
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Post Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Hey guys, first off, thank you so much for your help on the last issue!!

    I have another one for you which is very similar, and is to do with formatting data.

    Here is a sample of the pricing data: exporteddatasamplesheet.csv

    As you can see it's product, supplier, date, price, date, price, date, price, etc

    I need every column to be ONE date, and hold all the supplier pricing info on each column for that one date, and then in order of said such dates. So I can see pricing data over time, and easily compare supplier pricing.

    If anyone could help it would be greatly appreciated. I've ran it through chatgpt for the past few hours and it's not helped much haha.

    Thank you in advance guys! You are the best

    Lou

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Quote Originally Posted by loutromans View Post
    chatgpt didn't help!
    Because of course ChatGPT didn't help.

    Do you mean that you want all data in column C to be for 2023-08-11, then all data in column E to be for 2023-08-12, and so forth?

    Your data also shows time. This will be greatly simplified if you care only about date and not time. Can you clarify what you need?

    I think your data layout could be improved by normalizing this so that each row had one product/supplier, and one date. From there you can use other sheets to view the data in different ways for the comparisons you need.

    I will look at this again after I make sure I understand your requirements. I suspect that the best way to tackle this may be Power Query, which I do not have experience with.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Do you mean that you want all data in column C to be for 2023-08-11, then all data in column E to be for 2023-08-12, and so forth?
    Yes exactly!

    Your data also shows time. This will be greatly simplified if you care only about date and not time. Can you clarify what you need?
    Yes, only date is more than fine!

    I think your data layout could be improved by normalizing this so that each row had one product/supplier, and one date. From there you can use other sheets to view the data in different ways for the comparisons you need.
    ahhhhhh okay. I'm open to anything to be honest. There will be months/years worth of data too though, so something to bare in mind!

    I will look at this again after I make sure I understand your requirements. I suspect that the best way to tackle this may be Power Query, which I do not have experience with.
    I appreciate you looking. Thank you so much. If this requires power query then I'll try my best to learn it, or seek additional help too!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,659

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    How many product Name do you have?
    I am thinking what if product Name will be running accross columns, and dates are increasing downward by rows
    Quang PT

  5. #5
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Thumbs up Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    How many product Name do you have?
    around 100 products, but eventually up to 1000

    I am thinking what if product Name will be running accross columns, and dates are increasing downward by rows
    I guess this could work too?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,947

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    I note many products have more than one price for a given date so are all prices to be reported ?.

    1000 UNIQUE products vs 1000 in total [with duplicates (multiple suppliers)] ?

    months/years worth of data
    Can you clarify as the row/column numbers are going to very large!

    Perhaps you need to assess more carefully what type of analysis is required, rather than just simply transforming a large volume of data.

    e.g Price comparison between suppliers based on a "month by month" analysis.
    Last edited by JohnTopley; 10-10-2023 at 01:03 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Thank you John

    I note many products have more than one price for a given date so are all prices to be reported ?.
    The min of the two can be reported


    Can you clarify as the row/column numbers are going to very large!
    Well the max I have right now is three months. But this will be a continuous database I'll be adding to daily. So, eventually, it will reach the year's worth of data surely.


    Perhaps you need to assess more carefully what type of analysis is required, rather than just simply transforming a large volume of data.

    e.g Price comparison between suppliers based on a "month by month" analysis.

    I am going to be running this through AI and python rules to find products that are:

    1. increasing in price
    2. decreasing in price
    3. all time lows/highs
    4. best buying opportunities
    5. best selling oppurtutnies


    Thank you for your time to reply John and everyone else too!

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,460

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    this will be a continuous database I'll be adding to daily. So, eventually, it will reach the year's worth of data surely.
    I am going to reiterate what 6StringJazzer said, then. If this is going to grow to be a substantial database, start the project off on the right foot by designing the database well from the beginning. I'm not a database person, myself, but I can see a lot of people talking about good database design. I think you will find that these analyses and queries and such will be a lot easier if you design your database well.

    I see four fields in your sample, 1) product, 2) supplier, 3) date, 4) price. If there are other fields, identify them now. Build your database like that. Then, when you want to chart the price for a given product over time, it will be a simple query/filter of the raw data.

    Edit to add: Power Query is probably the tool of choice for rearranging the data in your sample text file. Unfortunately, I don't know PQ at all, so someone else will have to help with the commands or M code programming to shape the text data.
    Last edited by MrShorty; 10-10-2023 at 04:53 PM.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  9. #9
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Thank you so much for that Shorty. Definitely in the long term that is my goal. I'll find someone to help with PQ.

    But to just test the idea out, I only need three months of data (so around 90 prices x 100 products).

    So is there a way I can re-format my data with just the three months for the time being to test out the idea?

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,947

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Please Login or Register  to view this content.
    See attached: reformatted data
    Attached Files Attached Files
    Last edited by JohnTopley; 10-11-2023 at 08:16 AM.

  11. #11
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Thank you so much John! Most appreciated.

    Any recommendations to get started with PQ, or where to find someone who can help?

    Thank you

    Louis

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,947

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    I don't have PQ and hence no knowledge of: but there are certainly very knowledgeable PQ contributors so hopefully someone will respond.

  13. #13
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Red face Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Hey John,

    again I can't thank you enough for what you have done for me.

    The VBA code is working great

    Have a wonderful life mate

    Lou
    Last edited by loutromans; 10-17-2023 at 03:00 PM.

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,767

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Here is the Power Query to get your data normalized into a database format that you can then analyze more easily. Personally, with the size you are talking about, I would set up the database in MS Access. You can then run queries on the data. You will have nearly unlimited amount of data that you can input. But enough of that. Here is the Mcode to Unpivot your data

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  15. #15
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,767

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    I have changed up the code a bit after importing the csv file directly into PQ and not loading it first into Excel.

    Please Login or Register  to view this content.
    Using this file example you can now pivot your data or graph it or analyze it in any way you wish as it is now in a normalized condition.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-21-2023
    Location
    London
    MS-Off Ver
    Version 2303 (Build 16227.20212) - Microsoft 365 App for Business
    Posts
    19

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    Thank you ever so much Alan, I'll test that out ASAP!

    You guys are truly the best

    God bless

  17. #17
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,767

    Re: Data Formatted incorrectly with date/pricing - chatgpt didn't help! :(

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Replies: 1
    Last Post: 07-29-2022, 09:05 AM
  2. [SOLVED] incorrectly formatted reference number
    By bassinator in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-27-2019, 05:35 AM
  3. Vlookup source data formatted incorrectly?
    By crmadden in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-16-2017, 07:17 PM
  4. [SOLVED] Filter & remove incorrectly formatted mobile numbers
    By garryhope86 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2015, 09:27 PM
  5. Replies: 2
    Last Post: 06-26-2014, 08:59 AM
  6. [SOLVED] Calculate Pricing from Start and End Date with different Pricing Weight for Each month
    By xyang06 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2013, 02:54 AM
  7. Incorrectly formatted numbers
    By mikecook in forum Excel General
    Replies: 3
    Last Post: 06-02-2010, 08:37 AM

Tags for this Thread

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