Hierarchy h = d.getHierarchies().get(hierarchyName);
QueryHierarchy qh = query.getHierarchy(h);
for (Level l : h.getLevels()) {
for (String levelU : levels.get(key)) {
if (l.getUniqueName().equals(levelU) || l.getName().equals(levelU)) {
qh.includeLevel(l);
}
}
}
if (qh.getActiveQueryLevels().size() > 0) {
query.moveHierarchy(qh, Axis.ROWS);