cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

EPMAxisOverride not working

arun_varghese
Contributor
0 Likes
785

Hi All

System : BPC 10.0
EPM Add-In : SP28 Patch 2

Requirement:
I have a report in which user selects a dimension from a drop-down and then based on the dimension selected the dimension members are selected from a EPMContextMember formula. Both these values are passed into an EPAxisOverride formula

Cell P42 has =EPMContextMember(,P41)
=EPMAxisOverride("000",TRUE,P41,P42)

I have a simple custom Refresh via a VBA button

Sub REFRESH()
Dim a As New FPMXLClient.EPMAddInAutomation
a.RefreshActiveWorkBook
End Sub

However, when I refresh the sheet using button, the AxisOverride doesnt work.
When I refresh the sheet using the "Refresh" icon from Excel ribbon, the dimension override does work.

Screenshot with Refresh via VBA button, where the user selection via EPMContext is not reflected in the Rows

scn-refresh-button.png

Screenshot with Refresh using EPM Ribbon, where the user selection via EPMContext is reflected in the Row

scn-refresh-ribbon.png

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Likes

For sure it's incorrect to disable events when you call RefreshActiveWorkBook or other EPM API functions!

In my test everything was fine with just the code you have post:

Public Sub REFRESH()
Dim a As New FPMXLClient.EPMAddInAutomation
a.RefreshActiveWorkBook
End Sub

P.S. In future please post FULL code you are trying to run!

former_member186338
Active Contributor
0 Likes

Sorry, but you have to provide full info if you really want an answer:

Sample report screenshot with formulas visible

EPM SP

Step-by-step scenario.

P.S. Why you are using EPMAxisOverride instead of EPMDimensionOverride?

arun_varghese
Contributor
0 Likes

Hi Vadim,

EPM Add-In : SP28 Patch 2

The user will be selecting dimension from a drop-down then the members from a EPMContextMember formula

Screenshot with Refresh via VBA button, where the user selection via EPMContext is not reflected in the Rows

scn-refresh-button.png

Screenshot with Refresh using EPM Ribbon, where the user selection via EPMContext is reflected in the Row

scn-refresh-ribbon.png

former_member186338
Active Contributor
0 Likes

First - it's a bad idea to use "Insert File" instead of "Insert Image" Hate list #3

Second "Sample report screenshot with formulas visible" - formulas in P41 and P42 are not visible!

arun_varghese
Contributor
0 Likes

Hi Vadim,

Sorry. Will keep this in mind in 'Insert Image' instead of 'Insert File' in future

Meanwhile, I have found the issue.
I was disabling events before Refresh and then enabling them after Refresh and probably the override event was not triggering. The moment I commented outh these 2 lines, the AxisOverride worked with the Refresh button

    Application.ScreenUpdating = False
    'Application.EnableEvents = False
    Call REFRESH
    Application.ScreenUpdating = True
    'Application.EnableEvents = True