• 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
  • Login

Filter data with slicers by cumulative periods. Data contains data.mm.yyyy dates|Power Pivot|Excel Forum|My Online Training Hub

You are here: Home / Filter data with slicers by cumulative periods. Data contains data.mm.yyyy dates|Power Pivot|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 PivotFilter data with slicers by cumulat…
sp_PrintTopic sp_TopicIcon
Filter data with slicers by cumulative periods. Data contains data.mm.yyyy dates
Avatar
S S

New Member
Members
Level 0
Forum Posts: 2
Member Since:
September 3, 2020
sp_UserOfflineSmall Offline
1
September 3, 2020 - 4:52 pm
sp_Permalink sp_Print sp_EditHistory

I have a table with dates (dd.mm.yyyy) and transactional data (sales, discounts, hour rates etc). I have also a separate calendar table. I want to build Power Pivot charts with slicer there user selects “Last month” or "Last 3 Months" or “YTD” and the transactional data in the chart switches based on this selection filtering only data for relevant months. I’ve tried to build via SWITCH but didn’t succeed.
Second point is that in those charts I also want to show growth vs same cumulative period last year based on user selection in slicer. When user selects eg "YTD" chart shows growth YTD vs YTD previous year; if user selects "Last month" the calculation of growth % is based only on last month vs previous year same month.
I believe this should be solved via SAMEPERIODLASTYEAR but I am confused if I have to create measures for each metric (sales, discounts, hour rates etc)? And how to link it with the slicer selection of periods?

Cross posted here.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4620
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 3, 2020 - 8:01 pm
sp_Permalink sp_Print

Hi, 

Welcome to our forum!

You can change PivotTable aggregation methods using Slicers as explained here. You do need separate measures for the different periods. I hope that points you in the right direction.

Mynda

Avatar
S S

New Member
Members
Level 0
Forum Posts: 2
Member Since:
September 3, 2020
sp_UserOfflineSmall Offline
3
September 3, 2020 - 10:55 pm
sp_Permalink sp_Print

Thank you vey much Mynda! This is from what I've started (trying to overcome for the second day..) - but what I want is when user selects "MAT" at the slicer than all the metrics would use only data for periods attributed to MAT. This is a bit different from what is in the tutorial (where it changes calculation method but not filters periods).

I have a sample data with the desired output at the "Destination Tab". Can you please have a look if you have ideas on how to resolve that?

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4620
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 4, 2020 - 9:52 pm
sp_Permalink sp_Print

Hi, thanks for sharing your file. First, your calendar table must have consecutive dates if you want to use the time intelligence functions like SAMEPERIODLASTYEAR etc. Your calendar table only has the first date of each month.

In the attached file I've fixed the calendar table and created the measures for the Spend. You need to create additional measures for the discounts.

Note: because your data skips months, the L3M only includes 2 months' worth of data i.e. Sep & Aug.

I hope that gets you started.

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Saliha Mohamed
Guest(s) 10
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 186
Newest Members:
Kate Dyka
Kwaje Alfred Mogga
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Forum Stats:
Groups: 3
Forums: 24
Topics: 6546
Posts: 28658

 

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

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • 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

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

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

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.