MDX subset refresh after attribute update
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
MDX subset refresh after attribute update
I've been having a problem where a report that is based on a MDX report doesn't reflect the latest MDX subset. Mike Cowie's already diagonsed the problem by noting that MDX subsets that are based on attributes (as mine is) can't be sure to refresh automatically.
So my question is how do I manually force the refresh? My attributes are populated via a TI process, so I can write something in the epilog to fire the refresh, but I'm not sure what to write. Perhaps cycle through the subset using subsetgetsize etc? Or put a dummy element in the dimension and take it out again?
Version is 9.1.3
TIA,
Martin
So my question is how do I manually force the refresh? My attributes are populated via a TI process, so I can write something in the epilog to fire the refresh, but I'm not sure what to write. Perhaps cycle through the subset using subsetgetsize etc? Or put a dummy element in the dimension and take it out again?
Version is 9.1.3
TIA,
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
-
- MVP
- Posts: 3233
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: MDX subset refresh after attribute update
Hello Martin
I'm not sure what would trigger the update, though a DimensionElementDelete statement cannot be part of the Epilog tab.
Wim
I'm not sure what would trigger the update, though a DimensionElementDelete statement cannot be part of the Epilog tab.
Wim
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
- Steve Rowe
- Site Admin
- Posts: 2456
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: MDX subset refresh after attribute update
Hi Martin,
What about deleting and rebuilding the MDX sub from scratch at the end of (or in a 2nd TI), if it's used in a view you'll obviously need to put a dummy susbet in the view and then put the subset back.
Cheers
What about deleting and rebuilding the MDX sub from scratch at the end of (or in a 2nd TI), if it's used in a view you'll obviously need to put a dummy susbet in the view and then put the subset back.
Cheers
Technical Director
www.infocat.co.uk
www.infocat.co.uk
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: MDX subset refresh after attribute update
True, but I can call another TI process from the Epilog which could do this.Wim Gielis wrote: I'm not sure what would trigger the update, though a DimensionElementDelete statement cannot be part of the Epilog tab.
It's not used in a view, just for an Excel report. Yes, I was thinking that it might be easiest to rebuild, but I wonder if the new subset would get triggered correctly or if it would have the same problem. If it's possible, I'd rather find a way to make the MDX fire. Or at least understand what makes MDX fire, so I can be sure the new subset would work ok.Steve Rowe wrote: What about deleting and rebuilding the MDX sub from scratch at the end of (or in a 2nd TI), if it's used in a view you'll obviously need to put a dummy susbet in the view and then put the subset back.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: MDX subset refresh after attribute update
Hi
You could try running the M_CLEAR Macro in Excel followed by a recalc. This tends to cure quite a lot of issues where Excels local caching gets out of step with the server.
From memory, it is just Application.RUN("M_CLEAR")
As far as I know, there isn't anything you can do in a TI Process
Regards
Paul Simon
You could try running the M_CLEAR Macro in Excel followed by a recalc. This tends to cure quite a lot of issues where Excels local caching gets out of step with the server.
From memory, it is just Application.RUN("M_CLEAR")
As far as I know, there isn't anything you can do in a TI Process
Regards
Paul Simon
- LoadzaGrunt
- Posts: 72
- Joined: Tue May 26, 2009 2:23 am
- Version: LoadzaVersions
- Excel Version: LoadzaVersions
Re: MDX subset refresh after attribute update
How about this - it looks like its intended purpose is for something else, but it could have the 'side-effect' of doing what you want.
RefreshMdxHierarchy
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function updates the MDX hierarchies in a TM1 server without requiring you to restart the server.
Use this function after configuring or editing the custom named hierarchy levels for a dimension in the }HierarchyProperties control cube.
For details on using named levels with dimensions, see the related section in the IBM Cognos TM1 Developers Guide.
Syntax
RefreshMdxHierarchy(dimensionName)
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: MDX subset refresh after attribute update
Thanks Loadza, will try that. I've also tried the other suggestions already and waiting on feedback from the user.
Cheers,
Martin
Cheers,
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: MDX subset refresh after attribute update
It would appear that function doesn't exist in 9.1.3, Loadza. The other things haven't worked either and I've no idea why. Surely destroying the subset and rebuilding would have to work. Anyway, I guess I'm going to have to kill the dynamic subset idea. I'll either make it a static subset, or create dummy dimensions. The stink thing about a static subset is I have to run through it before adding each new element to ensure it's not there twice, which I why I'm contemplating a dummy dimension. If only there was a subix function.
Martin
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: MDX subset refresh after attribute update
It's not mentioned in any of the release notes (colour me surprisedMartin Ryan wrote:It would appear that function doesn't exist in 9.1.3, Loadza.

"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- LoadzaGrunt
- Posts: 72
- Joined: Tue May 26, 2009 2:23 am
- Version: LoadzaVersions
- Excel Version: LoadzaVersions
Re: MDX subset refresh after attribute update
Yes, I think it is new in 9.5... should have mentioned that...a scan of my collection of manuals shows RefreshMdxHierarchy first (and only) showing up in the 9.5 Developer and Reference document
- Steve Vincent
- Site Admin
- Posts: 1054
- Joined: Mon May 12, 2008 8:33 am
- OLAP Product: TM1
- Version: 10.2.2 FP1
- Excel Version: 2010
- Location: UK
Re: MDX subset refresh after attribute update
Martin, have your tried reordering the dimension? That may kick off the mdx to re-evaluate itself too, although it'd need to be all on its own as dim changes won't take effect until the TI completes its epilog.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: MDX subset refresh after attribute update
I've chucked this in the too hard basket and gone with a static subset. End up being marginally faster anyway, which surprised me. I thought having to cycle through the subset would have increased execution time quite a lot.
I wonder now if there might've been an element of "warmware" error where the user wasn't waiting for the report to update before deciding it was wrong, but as I've now implemented the static subset solution I'm not worried enough to go back and test that out.
Thanks for all your suggestions. Might try it all again when the client upgrades.
Martin
I wonder now if there might've been an element of "warmware" error where the user wasn't waiting for the report to update before deciding it was wrong, but as I've now implemented the static subset solution I'm not worried enough to go back and test that out.
Thanks for all your suggestions. Might try it all again when the client upgrades.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer