SUBNM function#
SUBNM returns an element name (or an alias value) from a subset, either by index or by element name, and drives a picker cell. DIMNM is the same function without the subset argument. These are the parameter and picker cells that select the element a grid slices by.
SUBNM and DIMNM are native TM1 / Planning Analytics functions.
Signature#
=SUBNM("Server:Dimension", subset, elementOrIndex, [alias])
=DIMNM("Server:Dimension", index, [alias])
Arguments (SUBNM)#
| # | Argument | Type | Required | Permitted values and notes |
|---|---|---|---|---|
| 1 | Server:Dimension |
String | Yes | "server:dimension". |
| 2 | subset |
String | Yes | A named subset. Blank or "All" means the whole dimension. |
| 3 | elementOrIndex |
String or number | Yes | A string is treated as an element name; a number is treated as a 1-based index into the subset (at least 1). |
| 4 | alias |
String | No | An attribute of type Alias to display instead of the element name. |
SUBNM takes three or four arguments. DIMNM takes two or three (it has no subset argument). The default result is an empty string.
What happens when an argument is wrong#
Argument-count and missing-value failures depend on the connection's Calc Mode: they are hard errors when Calc Mode is on and warnings that stop the cell when it is off. See how Reportworq handles errors.
| Situation | Result |
|---|---|
| Too few or too many arguments | Calc Mode on: hard error. Calc Mode off: warning, blank |
| Dimension, subset, or element not found | Calc Mode on: hard error. Calc Mode off: warning, blank |
alias is not an attribute of type Alias |
Warning, and the element name is returned instead |
| An index of 0 or less with no element name | Warning, blank |
Notes and limits#
- Alias precedence. An
aliasyou pass wins over the subset's configured alias. If the alias is not a real Alias attribute,SUBNMwarns but still returns the element name rather than failing. - If a cell shows
#VALUE!from a Planning Analytics for Excel workbook, the connection's Calc Mode setting can flipSUBNM/DIMNMpublic-versus-private subset resolution and can render invalid elements that way.
Examples#
=SUBNM("PlanTM1:Region", "Active Regions", 1)
=SUBNM("PlanTM1:Region", "Active Regions", "Northeast", "Region Long Name")
=DIMNM("PlanTM1:Region", 1)
Related pages#
- IBM Planning Analytics functions - the function index and the shared error model.
- TM1SET function - the hierarchy-aware equivalent with extra output modes.
- SUBSIZ function - the number of elements in a subset.
Feedback on this page
Comments, questions, requests, or something missing or unclear? Email us - the page you are on is filled in for you.
Email feedback on this pageOr write to support@reportworq.com directly.