• 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

Power BI Previous Year Comparison|Dashboards & Charts|Excel Forum|My Online Training Hub

You are here: Home / Power BI Previous Year Comparison|Dashboards & Charts|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 ForumDashboards & ChartsPower BI Previous Year Comparison
sp_PrintTopic sp_TopicIcon
Power BI Previous Year Comparison
Avatar
baxbax
Member
Members

Power Query

Power Pivot
Level 0
Forum Posts: 107
Member Since:
July 11, 2016
sp_UserOfflineSmall Offline
1
January 18, 2023 - 4:47 am
sp_Permalink sp_Print sp_EditHistory

Hi,

I am trying to create a measure in a BI Matrix visual that picks up the values for the previous year based on the current selection. The values are in a table which is broken down by Country, Manufacturer and Year/Qtr. The Year/Qtr field in not in a date format it is a text field with the values shown as YYQQ. There are two value fields, Units and Mkt Units.

What I am trying to achieve is something like the following. The measure I am trying to create are the ones to show the Previous Year rows:

Yr/Qtr 21Q1 21Q2 21Q3 21Q4 22Q1 22Q2 22Q3
Units 18,734 15,209 16,179 16,158 12,179 14,105 17,747
Units Previous Year 18,734 15,209 16,179
Mkt Units 135,449 132,266 115,625 123,706 86,638 113,493 143,875
Mkt Units Previous Year 135,449 132,266 115,62

The above shows the total value for the year and quarter. In the visual I will need to be able to filter the values by Country and/or Manufacturer.

I have added an Excel file that has some sample data in it. It also has a summary like the above created with Excel formulas. You can use the dropdowns in I1 and K1 to filter the data as required.

Any pointers on how to do this in BI will be very gratefully received.

Thanks

Bax

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
January 18, 2023 - 9:00 pm
sp_Permalink sp_Print

In order to include the time intelligence you want, you must have real dates in the data table and make use of a calendar table in the data model. So, I quickly added a column (manually) with dates based on the column with YyQn. And I created a calendar table.Then you can create measures to calculate the same quarter last year.

See if you can follow what I've done in the attached workbook. It can be made prettier, but I didn't go so far.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Sharon Fletcher, Mark McCosker
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.