Equivalent of TM1User() function in Rules

MarenC
Regular Participant
Posts: 346
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: Equivalent of TM1User() function in Rules

Post by MarenC »

Hi,
instead creating default views for relevant cubes using each users preferences through mdx subsets.
Obviously, I hope I didn't give the impression that I was recommending this be a fundamental feature of developing solutions!

As I said, I can hardly ever see a use case for these defaultmembers, and was really referring to self service and not including all dimensions in the view, again not a case I would ever really find useful!

So to summarise, you could use TM1USER in a rule as described, but would you really ever want to? Probably, almost certainly, not.
burnstripe
Regular Participant
Posts: 197
Joined: Wed May 06, 2020 2:58 pm
OLAP Product: Planning Analytics
Version: 2.0.9
Excel Version: 2016

Re: Equivalent of TM1User() function in Rules

Post by burnstripe »

Sorry I wasn't being critical, using the TM1User in rules can give a nice level of flexibility however just need to be careful using it. I've encountered a system were the TM1User was used in every cube so that the user could set a year and period and look at P&L and Balance sheet from a period perspective, which was fine when there was limited data, but after a few years the system ground to a halt due to all the rules and feeders required to make the approach work.

I so wanted to rip that model apart and rebuild but client didn't have the budget and no doubt that model has been canned by now as it had stack overflow galore.
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Equivalent of TM1User() function in Rules

Post by Wim Gielis »

I once used the TM1User function in (element) security rules and the model still runs after almost 10 years.
But I would not go much further than that, honestly, in rules.

In MDX I do create dynamic subsets involving the logged in user, for example, the default currency can be an attribute on the }Clients dimension and be shown automatically in views for the logged on user.
Best regards,

Wim Gielis

IBM Champion 2024
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
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Equivalent of TM1User() function in Rules

Post by Duncan P »

If my understanding of caching is still valid, then I would be very wary of relying on any numerical results that had been calculated from the result of TM1User().

This is because of caching of calculated numeric cells. Any cell that has taken more that the configured number of steps to calculate is stored in a cache that is shared across all users. If a different user queries that cell, or a calculated cell that relies on it, then the request will find the cached value which was calculated from the previous user, and return it.

This will not affect string cells, which are not cached, nor numeric dimension attribute values, which are stored as strings and so not cached either.
Post Reply