*/
public static MdxValueExpression getParentShareExpression(
MdxQuery mdxQuery, String label, Axis shareMeasureOrientation)
throws NoHierarchyToAnalyzeShare {
Hierarchy analyzedHierarchy = mdxQuery.getHierarchyDeepest(shareMeasureOrientation.getSecondAxis());
if(analyzedHierarchy==null)
throw new NoHierarchyToAnalyzeShare(shareMeasureOrientation.getSecondAxis());
List<Hierarchy> analyzedHierarchyList = new ArrayList<Hierarchy>();
analyzedHierarchyList.add(analyzedHierarchy);
MdxValueExpression secWithExpr =
new MdxValueExpression("'( "+analyzedHierarchy.getCurrentMember()+"/"+analyzedHierarchy.getHierarchyAll()+")',FORMAT_STRING = \"Percent\"",
mdxQuery.getMeasure().getMemberExpression(label).getDefinition(),
analyzedHierarchyList);
return secWithExpr;
}