mapping.rowAdd
Adds a row within a mapping table. If the unique combination of keys for one side of the mapping conflict with another row, the other row is removed from the mapping table. This ensures that there is always a 1:1 mapping between keys on each side of the mapping.
js
mapping.rowAdd(mappingName, leftKeys, rightKeys);
Parameters
mappingName
- An identifier used to find the target mapping.leftKeys
- An Array of strings representing elements from each of the mapping dimensions on the left side of the mapping table in order.rightKeys
- An Array of strings representing elements from each of the mapping dimensions on the right side of the mapping table in order.
Example
js
mapping.rowAdd("Time to Year and Month", ["FY2017 - Jul"], ["2017", "Jul"]);
This adds a new mapping between the Time dimension and the Year and Month dimensions allowing the mapping to be used in a cube formula linking two cubes with different dimensionality.
All elements specified on each side of the mapping need to be currently existing elements in the mapping dimensions.