Forum

Notifications
Clear all

Showing previous 12 months data when selected any month in pivot table slicer

7 Posts
4 Users
0 Reactions
557 Views
(@fanexcel)
Posts: 3
Active Member
Topic starter
 

Hi a great platform to answer unsolved questions.

Gents ,

I Have a table which has data for last 4 years by month by year the table has region, channel, brand and product as dimensions and have multiples measures Sales Volume, Value and market share.

 In pivot table i want to plot previous 12 months data whenever i select any specific month from slicer for example

 

if i select June 2020 in slicer the data to be displayed should be from previous 12 months as below

Can anybody help me How can i achieve this in a pivot table please send me a solution with a dummy data.

 

Thanks and Regards

Fanexcel Cool

 
Posted : 26/08/2020 6:38 am
(@purfleet)
Posts: 412
Reputable Member
 

Can you post the dummy data so that we dont have to waste time recreating it (probably incorrectly)

 
Posted : 26/08/2020 10:36 am
(@fanexcel)
Posts: 3
Active Member
Topic starter
 

Thanks for the quick response. I have attached the sample data for your reference.

 

Thanks 

Fan 

 
Posted : 26/08/2020 1:07 pm
(@purfleet)
Posts: 412
Reputable Member
 

I have not found a simple way of doing this. there seems to be ways with extra pivots/powerpivot or VBA but nothing straight forward.

It is possible to do something with formulas to only show the last 12 months from a given date using the =EOMONTH function, but again it can get complex when setting up.

 
Posted : 27/08/2020 12:49 am
(@fanexcel)
Posts: 3
Active Member
Topic starter
 

Thanks so this means we dont have ways to do it? 

Dear Mynda/Philips 

Please look in to this and could you provide me with a way to achieve this.

 

Thanks 

 
Posted : 27/08/2020 2:23 am
Anders Sehlstedt
(@sehlsan)
Posts: 972
Prominent Member
 

Hello,

There are of course other ways to achieve this, but as Purfleet mentions, it is not straight forward solutions and above all, not so dynamic as it could be.
You are better off if you can accept the users to highlight those 12 periods they want to see, instead of just one, because you are then using the functionality in Excel within its limits.

See attached file for examples.

Br,
Anders

 
Posted : 27/08/2020 4:47 pm
(@mynda)
Posts: 4761
Member Admin
 

You can't select one month in a Slicer and have Excel know which prior 12 month period you want displayed without also selecting the year.

The additional difficulty is that the Slicer filters the periods displayed in the PivotTable. If you're only choosing one month then it will only display one month. You can't tell it to display 12 months worth of data. You could display the total for the prior 12 months, but not the months broken out as you have them in your example.

I recommend you use the Timeline Slicer to allow your users to select the period they want to view.

Mynda

 
Posted : 27/08/2020 10:42 pm
Share: