Dimension without any elements / members
-
- Posts: 15
- Joined: Fri Mar 08, 2013 9:06 pm
- OLAP Product: TM1, Transformer
- Version: 10.1.1
- Excel Version: 2013
Dimension without any elements / members
Recently, I was interviewed for TM1 and was asked whether you could create a dimension without any members. I said that Dimension editor would throw an error stating that the dimension should have at least one element. However, the interviewer mentioned that it is possible and did not tell me how. I am really intrigued by this query. Can someone please pass some inputs? Have you ever done this before? Also, what was the business need to have a dimension without any elements in it?
Thanks in advance for your help!
Thanks in advance for your help!
-
- MVP
- Posts: 1827
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Dimension without any elements / members
As QML pointed out you can use TI or you could add a .dim file to the directory and manipulate it to contain no elements.
At the end of the day there is (almost) no reason to need to have empty dimensions but its a quick and easy question to ascertain whether someone understands the fundamentals of TM1 in an interview scenario.
At the end of the day there is (almost) no reason to need to have empty dimensions but its a quick and easy question to ascertain whether someone understands the fundamentals of TM1 in an interview scenario.
Declan Rodger
-
- 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: Dimension without any elements / members
Of course if you are allowed two steps in Architect you can create it with one element, then edit the structure and remove the element. It will then save OK with no elements.
-
- Community Contributor
- Posts: 324
- Joined: Mon Jul 02, 2012 9:39 pm
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: Sydney, Australia
Re: Dimension without any elements / members
As guys pointed out, its possible.. while you cant manually create then save dimension without inserting at least one element, you can get around it with process or removing existing elements then saving it.
Its a bit inconsistent, wouldn't you agree guys?
ET
Its a bit inconsistent, wouldn't you agree guys?
ET
-
- Site Admin
- Posts: 6645
- 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: Dimension without any elements / members
Yes and no.EvgenyT wrote:As guys pointed out, its possible.. while you cant manually create then save dimension without inserting at least one element, you can get around it with process or removing existing elements then saving it.
Its a bit inconsistent, wouldn't you agree guys?
There's an application that I'm writing at the moment. (Three, actually, which highlights the issue well for reasons that I'll explain shortly.) And one of the things that I've been contemplating with those three is:
"How much time should you put in to protect users from executing commands stupidly, thoughtlessly, and/or out of context, and what's the return in value for coding that protection?"
What I find is that with the GUI-intensive one, the one where you can do little more than click on buttons and enter some text or select menu items or buttons... it's really quite easy to put the coding in to intercept user stupidity.
The most complex one, which is a front end to a home brewed GL system, well, that one needs to be very flexible and powerful but that in turn means that users have the potential to do stupid things, some of which I've thought of, some I won't have.
And it's exactly the same with this in TM1. Creating an element-free dimension is something that is potentially stupid and/or reckless, especially when you start trying to add it to a cube. You can have consequences which are both undesirable and potentially quite bad.
In short, if you know what you're doing, you shouldn't do it.
And if you don't know what you're doing, then you probably shouldn't be trying to do it unless it's in a personal development environment where things can crash happily and do no real harm.
Should Iboglix have spent the time writing code to ensure that there is no way, no how that you can have an empty dimension?
While I'm prepared to criticise when criticism is due (and the Performance Muddler team would probably say "when it's not due as well", but we'll agree to disagree on that point) I'm not going to bag Iboglix for this one. I lean towards "no" in answer to that question, simply because with a system this flexible / powerful it is simply impossible to invest the resources in intercepting every single idiotic thing that a user might potentially do. It's just like with a car. You build in as many safety features as the average punter needs, but you can't protect someone from driving the wrong way down a one way street or following their GPS off a cliff. Having an elementless dimension is like the one way street analogy. You might get away with it, you might not, but it shouldn't be up to Ford, Mitsubishi, Holden, BMW or whoever (or in this case Iboglix) to build something to stop you from doing it.
"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.
-
- Community Contributor
- Posts: 324
- Joined: Mon Jul 02, 2012 9:39 pm
- OLAP Product: TM1
- Version: PAL 2.0.8
- Excel Version: 2016
- Location: Sydney, Australia
Re: Dimension without any elements / members
Well-rounded argument here Alan, Thank you! 

-
- Posts: 33
- Joined: Mon Sep 23, 2013 3:24 pm
- OLAP Product: TM1
- Version: 10.2
- Excel Version: Excel 2010
Re: Dimension without any elements / members
Loved that one, Alan!Alan Kirk wrote:... but you can't protect someone from ... following their GPS off a cliff.

I create my dims (and attributes) in TI processes (it helps me in migrating stuff between my DEV / QA and Prod environments).
And I always immediately add a minimum of one element to the dim immediately after creation: either a 'Total of _' element for regular dimensions or the measure elements (if it is a measure dim).
This single element lets me create my standard MDX subsets (An 'All Members' subset and a 'Level 0' elements) and my views.
When my source data has undergone drastic changes, and I need to reload my dims from scratch: I'd like to have the
Code: Select all
DeleteAllElements
It would be entreily my fault if i then refuse to do the
Code: Select all
DimensionElementInsert
I'd hardly go around blaming TM1 for giving me the chance to showcase my stupidity!
The Java_to_TM1 Convert
TM1 Version 10.1, 10.2, Cognos Insight 10.1, 10.2
Local: Windows 7 Professional, Excel 2007
Server: Windows Server 2008 64-bit
p.s. I have a healthy disregard for Performance Muddler.
TM1 Version 10.1, 10.2, Cognos Insight 10.1, 10.2
Local: Windows 7 Professional, Excel 2007
Server: Windows Server 2008 64-bit
p.s. I have a healthy disregard for Performance Muddler.
-
- 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: Dimension without any elements / members
Try
which is still undocumented in 10.2 despite working in 10.1.
Code: Select all
SubsetCreateFromMDX( subset_name, mdx_expression, dimension_name_in_case_mdx_returns_nowt );
-
- Posts: 15
- Joined: Fri Mar 08, 2013 9:06 pm
- OLAP Product: TM1, Transformer
- Version: 10.1.1
- Excel Version: 2013
Re: Dimension without any elements / members
Thanks a lot all of you. I tried all the methods and they worked. Thanks again!
-
- MVP
- Posts: 3223
- 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: Dimension without any elements / members
Thank you Duncan. The catch is that, if your MDX expression contains "nonsense" or inexisting formulas, the client will crash if you delete the subset manually.Duncan P wrote:Try
which is still undocumented in 10.2 despite working in 10.1.Code: Select all
SubsetCreateFromMDX( subset_name, mdx_expression, dimension_name_in_case_mdx_returns_nowt );
If SubsetDestroy is used in TI, it does not crash.
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
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Dimension without any elements / members
Temporary dimensions can be created, populated, analysed and then deleted as part of load processes without them ever having to be part of a cube. This sort of usage isn't the typical use of a dimension, but I'd say it isn't that rare either.declanr wrote:At the end of the day there is (almost) no reason to need to have empty dimensions ....
Robin Mackenzie
-
- MVP
- Posts: 1827
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Dimension without any elements / members
I agree that temporary dimensions have a place and I use them commonly. I also regularly use hidden dimensions for the purpose of creating picklists against. However as far as I read the OPs question it was regarding what purpose an EMPTY dimension would have in ongoing requirements.rmackenzie wrote:Temporary dimensions can be created, populated, analysed and then deleted as part of load processes without them ever having to be part of a cube. This sort of usage isn't the typical use of a dimension, but I'd say it isn't that rare either.declanr wrote:At the end of the day there is (almost) no reason to need to have empty dimensions ....
Declan Rodger
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Dimension without any elements / members
Yes, sure. If the dimension isn't being used in a cube, and is being used as a temporary queue, or an array, or something similar; then it being in an empty state isn't really a problem.declanr wrote:However as far as I read the OPs question it was regarding what purpose an EMPTY dimension would have in ongoing requirements.
Robin Mackenzie