• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Data transformation|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Data transformation|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryData transformation
sp_PrintTopic sp_TopicIcon
Data transformation
Avatar
David Klauz

New Member
Members
Level 0
Forum Posts: 2
Member Since:
January 29, 2021
sp_UserOfflineSmall Offline
1
January 29, 2021 - 5:09 am
sp_Permalink sp_Print

I have hard time figuring out how to transform data from a spreadsheet into useful format.

Please see the attached example of the data and what result should look like.

Please advise, I really enjoy your videos, but could not figure out this one.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
January 29, 2021 - 2:02 pm
sp_Permalink sp_Print

Hi David,

Welcome to our forum! I'm not surprised you're having trouble with this data. The row labels are all stuffed into a single cell while the actual values are in individual cells.

In the attached file I cleaned the row labels and values in separate queries and then merged them back together.

Note: your source file is a .xls, but you must save the file as a .xlsx for Power Query to work with the data properly.

Mynda

Avatar
David Klauz

New Member
Members
Level 0
Forum Posts: 2
Member Since:
January 29, 2021
sp_UserOfflineSmall Offline
3
February 2, 2021 - 6:56 am
sp_Permalink sp_Print

Mynda, thank you so much! It's kind of complicated to follow all your steps.

Is there a way to save them and apply to a new file?

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
February 2, 2021 - 12:35 pm
sp_Permalink sp_Print

You can copy the M code/query by selecting the query in the 'queries and connections' pane in Excel, then CTRL+C to copy it. This will copy the M code of the query. Then you can go to your new file and create a blank query. In the Power Query window open the Advanced Editor and CTRL+V to paste.

You'll need to do this for each query and you'll need to make sure the source data is formatted in an Excel Table called 'Table1' and that it has the exact same number of columns as my file, or change the query accordingly.

Mynda

Avatar
Jan Bednařík

New Member
Members
Level 0
Forum Posts: 1
Member Since:
February 17, 2021
sp_UserOfflineSmall Offline
5
February 19, 2021 - 5:39 am
sp_Permalink sp_Print

Dear Mynda and David,

I have been going through the file Mynda created as of my learning process to see what steps were taken to transform data. It is really great, great stuff (and easy one, if you know how to do it :)))). However, I found out a small mistake in Mynda's final file, as she forgot to filter out few lines from David's file. It is the year "2021" and the date "1/1/2021" that are between "Customer 4" and "Customer 5". It got into the final results in Mynda's file as the first and second cell in "Customer 5" as 2021 and null cell.

David, what makes me puzzled is that in the original file of yours, there is a mistake in "Totals" at the bottom: in the sum of "Value(Net)/msf" and
the sum of "Ton/msf", they are not correct. You can check for yourself.

I am enclosing my final file for your check.

Best Regards,

Jan

The following users say thank you to Jan Bednařík for this useful post:

Mynda Treacy
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Andy Kirby, Chandler Davis
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
wahab tunde
Cong Le Duc
Faisal Bashir
Ivica Cvetkovski
Blaine Cox
Shankar Srinivasan
riyepa fdgf
Hannah Cave
Len Matthews
Kristine Arthy
Forum Stats:
Groups: 3
Forums: 24
Topics: 6205
Posts: 27210

 

Member Stats:
Guest Posters: 49
Members: 31878
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.