PowerPivot report - getting multiple filter values and calculating prior year data

maverick15

New Member
Joined
Jun 11, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Thanks in advance!

I'm creating a PowerPivot based report in Excel 365. I'm reporting actual quarterly sales data, performance against plan, and performance against prior year. There is a calendar table that links to the data table. I'm deriving prior year quarter by taking the value of the filter selected and then manually changing it to be the prior year:

=CUBEMEMBER("ThisWorkbookDataModel","[Fiscal Calendar].[Fiscal Quarter].["&LEFT($E$12,4)-1&RIGHT($E$12,3)&"]")
E12 is the filter value that is the current quarter (YYYYQ0# format)

This is fine for single selections of current quarter. I want the user to be able to select multiple quarters and pull the total of the prior year quarters.

I can put the results into a CUBESET so that I can see individual values selected, but I would need to iterate over those values, recreate the proper prior year quarter values, and create a new CUBESET with the altered data to use as an option to pass to the CUBEMEMBER formula. How would I do that? Is there a better way?

Any help is appreciated.
Thank you!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,214,414
Messages
6,119,375
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top