For a while, we've known about the ability to use subsets in place of elements in a CellGetS/CellGetN functions, which makes sense since you can actually copy the subset name as text and paste it as a consolidation in the Architect dimension editor - nothing new here. While this works great for some cases in TIs, the DB calls in rules never quite had this functionality. For example:
Code: Select all
CellGetN('cubeName', vCycle, 'SubsetNameAsElement', vMeasure) <-- This will work
DB('cubeName', !Cycle, 'SubsetNameAsElement', !Measure) <-- This will fail
Code: Select all
CellValueN('cubeName', 'Cycle':!Cycle, 'Dimension':'SubsetNameAsElement', 'Measure':!Measure) <-- This will work!!!
NOTE: This WILL work for dynamic subsets, but the performance could take a huge hit. Use at your own risk - this may be a perfect solution for some easy dynamic or static subsets, but I would guess that this would have a huge negative impact on performance for some more complicated dynamic subsets.