Hi George,
Appreciate you testing this.
I followed your idea and it worked up to a point. The MDX didn't error and the MDX editor didn't remove code, so when I opened the MDX back up after closing, it looked the same.
However, a couple of issues arose.
First, nothing was being shown in the cube view, no data at all.
I determined the problem was this bit:
Code: Select all
SELECT
{
[Scenario].[Scenario].[Actual],
[Scenario].[Scenario].[UserVersion],
[Scenario].[Scenario].[Version Variance]
It just wouldn't recognise the UserVersion version, at least this is my theory. To get around this problem I included within the select statement the same MDX used to derive the [Scenario].[Scenario].[UserVersion].
This then started working as expected.
However, I then found another problem. When I tried to change the Year nothing happened, I mean I would go into the subset editor, literally change the year and apply but the year didn't update. I couldn't actually change any of the context dimension elements.
To get around this, I added a User Year selection element in the User Selection Cube, and put the MDX to this in the MDX view.
This didn't work at first because the MDX kept getting replaced by the hard coded year value, so the mdx became, [Year].[Year].[2024/2025] even though it was using:
Code: Select all
STRTOMEMBER("[Scenario].[Scenario].[" +
[_S-User Preferences].(
STRTOMEMBER("[}Clients].[" + UserName + "]"),
[_S-User Preferences].[User Year]) + "]")
I discovered the above was happening because the Year dimension was in the context area of the view, once I moved the Year to the columns, the MDX did not get replaced by the hard coded year and the report worked!
Maren