Creating a Dynamic Named set in an Olap Pivot Table

libby845

New Member
Joined
May 8, 2017
Messages
15
Hello -

I have an OLAP pivot. I created a named set for columns using the named set builder in excel. I built the set because I can't easily cross years using an OLAP Pivot because I need to pull different Measures in the columns (messy).

Column 1 Dec Prior Year for Measure.Period End balance.
Column 2 - 12 Jan - Dec for Measure.Amount
Column 13 Dec current year Measure.Period End Balance.

I used the build named set function in excel and got this (This is the MDX auto-built).

{([FISCALYEARS].[FISCAL YEAR].&[2015],[PERIODS].[PERIOD DESCRIPTION].&[12],[Measures].[PERIOD END BALANCE]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[1],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[2],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[3],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[4],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[5],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[6],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[7],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[8],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[9],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[10],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[11],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[12],[Measures].[AMOUNT]),([FISCALYEARS].[FISCAL YEAR].&[2016],[PERIODS].[PERIOD DESCRIPTION].&[12],[Measures].[PERIOD END BALANCE])}

This works as expected. However the year is hard coded. Is there a way I can point the Fiscal Year to the report filter for current year and (report filter - 1) for prior year?

Thanks!
Pam
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I think you need a text value in place of the [2016]
So maybe
Code:
Text(Year(Today()),"[YYYY]"

Are you missing out on PowerPivot?
Rob Collie mentioned in his book about building custom calendars. Also at his PowerPivotPro site.
...and no I'm not in the OLAP group:eeek:
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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