Code: Select all
HierarchySubsetCreate(dimName, hierName, subName);
HierarchySubsetMDXSet(dimName, hierName, subName, sMDX);
ViewCreate(cubName, vwName);
ViewSubsetAssign(cubName, vwName, dimName, subName);
# Process aborts with the message "Subset "subName" not found in dimension "dimName"
Code: Select all
# if this is used:
HierarchySubsetCreate(dimName, hierName, subName);
HierarchySubsetMDXSet(dimName, hierName, subName, sMDX);
sDimHierCombo = EXPAND('%dimName%:%hierName%');
ViewCreate(cubName, vwName);
ViewSubsetAssign(cubName, vwName, sDimHierCombo, subName);
# it aborts with: Cannot use an alternate hierarchy with this funtion, referencing the line with the ViewSubsetAssign
So the question is, what is the best practice to build a view to zero out IF one is using hierarchies? One suggestion was to add the elements in the hierarchy to the main dimension and building the subset there, but that creates a whole host of other maintenance issues. It seems odd that alternate hierarchies preclude being able to zero out a slice based on a hierarchy.
Have I missed something? Thoughts?