• 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

Dates created with formulas in Excel not transferring properly into Power Query|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Dates created with formulas in Excel not transferring properly into Power Query|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 QueryDates created with formulas in Exce…
sp_PrintTopic sp_TopicIcon
Dates created with formulas in Excel not transferring properly into Power Query
Avatar
Anne Walsh
Member
Members
Level 0
Forum Posts: 100
Member Since:
May 2, 2014
sp_UserOfflineSmall Offline
1
April 5, 2018 - 9:11 pm
sp_Permalink sp_Print

I have a file that I have (successfully!) loaded into a PowerPivot model using Mynda's advice on using Connection only. However I have two columns that have date entries (these have been created with formulas from other data) and they are not showing up properly in the PowerPivot model. I've changed the format to date in both Excel and Power Query and still they are showing up as 31/12/3798 00:00:00 (instead of 11/7/2017) and 30/12/1899 00:00:00 instead of 11/7/2018. Any ideas? 

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
April 5, 2018 - 9:25 pm
sp_Permalink sp_Print

Hi Anne,

Not without seeing what it looks like in Power Query. Can you share screenshots of the Power Query editor view, including the formula/M code you used to create the dates etc.

Mynda

P.S. the date format in the Excel worksheet won't be the issue as it goes from Power Query to Power Pivot, so somewhere between the two the date is not being translated properly.

Avatar
Anne Walsh
Member
Members
Level 0
Forum Posts: 100
Member Since:
May 2, 2014
sp_UserOfflineSmall Offline
3
April 6, 2018 - 5:51 pm
sp_Permalink sp_Print

So I have two columns that are not transferring properly...I've changed them both to Date/Time in PQ

1. Column is called: Contract Start Date. This is the formula. DATE(YEAR([@[S&M Renewal Date - Finish]]) -[@[Years subscription]], MONTH([@[S&M Renewal Date - Finish]]), DAY([@[S&M Renewal Date - Finish]])). The result appears as a normal date. 

Works fine in Excel. 

2. Second column: Renewal date: -VLOOKUP([@Name],Invoicing_schedule[#All],7,FALSE). Again works fine in Excel 

Closed and loaded connection only to PowerPivot. 

This is now what the dates look like: see attached screenshot. Grrr... thanks as always. 

sp_PlupAttachments Attachments
  • sp_PlupImage moth_PQ_date_issue.png (312 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
April 7, 2018 - 8:13 am
sp_Permalink sp_Print

Hi Anne,

That looks like the Power Pivot screenshot. I need to see the Power Query view. After seeing your formula I think I need to see everything from beginning to end and screenshots aren't going to suffice.

Let's try this, can you please create a mock up Excel file with your dates in Excel calculating correctly and then load them into Power Query and calculate them in there, then load to Power Pivot so I can see the whole chain.

Thanks,

Mynda

Avatar
Anne Walsh
Member
Members
Level 0
Forum Posts: 100
Member Since:
May 2, 2014
sp_UserOfflineSmall Offline
5
April 9, 2018 - 6:51 pm
sp_Permalink sp_Print

Well DOH! on my part. I'm sending you a mockup of the actual file I use. The only steps I implemented were:

1. Unpivot other columns from I to CFO to normalise the dates. 

2. Columns F and G both work perfectly in Excel. When I pull them into PQ, the results are still fine but  they show up as data type "Any* - which I changed to date/time for both of them. It's only when I load into Powerpivot that it does the time travel thing! 

3. Columns I to CFO - those dates show up fine.. Thank you so much 🙂 

Avatar
Alex Gavryliuk
Member
Members
Level 0
Forum Posts: 7
Member Since:
August 23, 2016
sp_UserOfflineSmall Offline
6
April 9, 2018 - 7:14 pm
sp_Permalink sp_Print

Hi Anne,

seems like its little bit strange, because if date in Excel showsing correctly and in PQ working fine after transforming to Date type its suppose to be working with in PowerPivot as well. just try to change format in PowerPivot for problematic columns: Home-Formatting-Data Type-Date (see snapshot). if you can share example of your data with working formulas (as it was mentioned in post above) it will be better because your file without PowerQuery information

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
7
April 10, 2018 - 3:46 pm
sp_Permalink sp_Print

Hi Anne,

Thanks for the file, however the problematic columns are formulas that don't evaluate unless I have access to the file Netfort_12.xlsx. Are you able to place the table being looked up in this file so I can see the format of the lookup data table?

Note: those columns F and G have a date format that adapts to regional settings, so I really need to see the lookup table as I suspect this is the problem.

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Valentyn Kristioglo, Tiffany Kang, stuart burge
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
stuart burge
Bruce Tang Nian
Scot C
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Forum Stats:
Groups: 3
Forums: 24
Topics: 6223
Posts: 27294

 

Member Stats:
Guest Posters: 49
Members: 31919
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.