TM1 formulas and array formulas

Post Reply
Wim Gielis
MVP
Posts: 3241
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:

TM1 formulas and array formulas

Post by Wim Gielis »

Just out of curiosity... has anyone ever played around with the combination of TM1 formulas and array formulas in Excel?
The latter being defined as "they have to be entered with Control-Shioft-Enter, rather than Enter only".

For example, with 1 formula, calculate the maximal number of elements over all dimensions:

=MAX(DIMSIZ("CXMD:" & DIMNM("CXMD:}Dimensions",ROW(INDIRECT("1:" & DIMSIZ("CXMD:}Dimensions"))))))

... entered with CSE (Ctrl-Shift-Enter) so that curly braces ( { } ) appear around the formula in the formula bar. But it doesn't work... :-(

If you have 5 dimensions in the TM1 model, the bit with ROW(...) correctly evaluates to the array {1, 2, 3, 4, 5}
But supplying this array to the DIMNM function as the "index" (now an array of indexes) will leave us with only the first element in the array (index 1) and hence, get the maximum of only 1 dimension's elements.

Anyone done this before?

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
Post Reply