• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Is it possible to do Year over Year calculations with this data?|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Is it possible to do Year over Year calculations with this data?|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
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 QueryIs it possible to do Year over Year…
sp_PrintTopic sp_TopicIcon
Is it possible to do Year over Year calculations with this data?
Avatar
Toussaint Ops

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
July 27, 2022
sp_UserOfflineSmall Offline
1
July 27, 2022 - 7:33 am
sp_Permalink sp_Print

I currently have a table 

 

[Date][Weekday][Store][Count]

 

with dates that start at 06/01/2020 and go to 06/30/2022

 

I'd like to create a year over year comparison of each count by weekday for each year. Each week goes from Monday to Saturday, and skips Sunday.

 

For example

6/1/2020 Mon South 30
6/2/2020 Tue South 29
6/3/2020 Wed South 34
6/4/2020 Thu South 35
6/5/2020 Fri South 29
6/6/2020 Sat South 28
6/8/2020 Mon South 30

notice how it skips sunday and goes back to Monday,

also, if we were comparing 06/01/2020's monday to 2021, it would be monday 06/07/2021 and for 2022, it would be monday 06/06/2022

Trying to understand the best way to go about this

Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 486
Member Since:
January 31, 2022
sp_UserOfflineSmall Offline
2
July 27, 2022 - 1:25 pm
sp_Permalink sp_Print

Have you tried a regular pivot table? If you could upload an Excel file containing a bit more than just one week of data, it would be easier to demonstrate.

Avatar
Toussaint Ops

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
July 27, 2022
sp_UserOfflineSmall Offline
3
July 28, 2022 - 5:15 am
sp_Permalink sp_Print sp_EditHistory

Here's an attachment. Now I have a bit of a different approach/request.

It's column format is now 

 

[Weekday][Count][Date Range][Store]

 

You'll see in the data there are two ranges, one for 2020 and one for 2021

 

And I'm now wondering how I could create a pivot table that shows the counts side by side for each range and the difference between them

 

(maybe even using a year over year calculation where you subtract last year's count from the next years count, and divide that remainder by last year's count)

Avatar
Riny van Eekelen
Örnsköldsvik, Sweden
Moderator
Members


Trusted Members

Moderators

Power BI
Level 0
Forum Posts: 486
Member Since:
January 31, 2022
sp_UserOfflineSmall Offline
4
July 28, 2022 - 1:50 pm
sp_Permalink sp_Print

Thanks for the file. Since you already started in PQ, I continued there. Though, your file connects to data on your PC and I can not work with with your query. If you can get to the stage that I created in the blue table, then you can follow the code that I created on that one, producing the green table in O1.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Philip Treacy
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 215
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
jo moffitt
Michael Zandt
Ibraam Nasif
Gali Balmocena
Jocelyn Degran
Nurul Amalina
Sarah Mooney
Gopinath Gopalan
Nick Pape
Fakhar Zaman
Forum Stats:
Groups: 3
Forums: 24
Topics: 6347
Posts: 27751

 

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