• 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
You are here: Home
Lost password?
sp_Search
Advanced Search|Last Search Results
Advanced Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search

Please confirm you want to mark all posts read

Mark all topics read

sp_MobileMenu Actions
Actions
sp_LogInOut
Log In
sp_Search

Search Forums

sp_RankInfo
Ranks Information
Avatar

New/Updated Topics

General Excel Questions & Answers

  Grey out master list when selected in dropdown

  Customer Order From Facebook Page.

Dashboards & Charts

  How to link a doughnut chart with the existing slicer?

VBA & Macros

  Send Email Code Error

  how can i add windows media player in excel 2016

  Direccionar de un rango a una celda especifica

  Changing shape colours

  Need VBA code to find unique group of Repetation follow by B…

Power Query

  Need help describing what I want to accomplish

  Opening several PDFs from a Sharepoint site, and validating …

  Unpivot data in Power Query

Power Pivot

  Slicer not greyed out for items without data

  Power Pivot TopN not calculating correctly

Power Query

  pq_7.01_parameter_tables

Power BI

  How identify the URL to connect power bi with Project online

Select Forum

  Rules and Guides

Forum Rules and Guides

  Public Forums - For Registered Users

General Excel Questions & Answers

Dashboards & Charts

VBA & Macros

Power Query

Power Pivot

  Course Members Only

Excel Dashboards

Power Query

Power Pivot

Xtreme Pivot Tables

Excel for Decision Making

Excel for Finance

Power BI

Excel

Word

Outlook

Excel Expert

Excel for Customer Service Professionals

Excel Analysis Toolpak

Excel Tables

Excel for Operations Management

Financial Modelling

Advanced Excel Formulas

Pivot Tables Quick Start

ForumsPower Pivot
sp_TopicIcon
Same week last year
Avatar
Jeremy Hart
Posts: 1

Level 0
October 18, 2019 - 7:10 am

1

Hi!

I am new to using PowerPivot and I am hoping someone could help me with the following question.

I need to create a measure that shows the total number of incidents logged for the same period last year. I have created a calendar table and I have also added a column named Week Commencing as my reporting week starts on a Friday.

If I use the following measure, the total is not correct for the previous year.

=CALCULATE(COUNT('Incident Data'[Number]),SAMEPERIODLASTYEAR('Calendar'[Date]))

If I use the below measure, the cells are blank.

=CALCULATE(COUNT('Incident Data'[Number]),SAMEPERIODLASTYEAR('Calendar'[Week Commencing]))

Any help would be appreciated.

Kind regards

Jeremy

Avatar
Mynda Treacy
Posts: 4438
Level 10
October 18, 2019 - 10:20 am

2

Hi Jeremy,

Welcome to our forum! Thanks for attaching your file. If you build a PivotTable and place the Date field in the rows, then expand it down to the Day level of detail you can see the values that make up the 'Last Year' figures e.g.:

  • The 'Last Year' value for Jan 4, 2019 of 441 consists of the values for Jan 5 through 10, 2018, and
  • The 'Last Year' value for Jan 11, 2019 of 481 consists of the values for Jan 11 through 17, 2018. 

In other words, there was no Jan 4 value for 2018, therefore the 'Last Year' value for Jan 4, 2019 only includes values for 6 days. When working with week comparisons where you want to compare the same days in the previous year, you need to employ a different approach. This article will point you in the right direction.

Mynda

Forum Timezone:
Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Ben Hughes, Alison West, Ramon Lagos, Shawn Barwick
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)

Devices in use: Desktop (8), Phone (8)

Forum Stats:
Groups: 3
Forums: 24
Topics: 6201
Posts: 27185
Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
© Simple:Press

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.