Question

Is there anyway that we can get the top 10 throught out the hierarchy instead of top level in MDX. I would like to write an MDX query which pulls the top 10 at each level in the hierarchy. Please let me know if it is possible.

Hierarchy looks something like below:

  • Regions(get Top 10)
    • Countries(get Top 10)
      • States(get top 10)
        • Cities(get top 10)
          • So on...
Was it helpful?

Solution

If you want to get the top 10 on a level you can use

TopCount([your dimension].[Regions].Members, 10, 'your measure')
TopCount([your dimension].[Countries].Members, 10, 'your measure')
...

If you want to get the top 10 regions with their top 10 countries... You can use DrilldownLevelTop:

DrilldownLevelTop(TopCount([your dimension].[Regions].Members, 10, 'your measure'), 10,, 'your measure')

You have to add other DrilldownLevelTop around the previous expression if you want to get the members on the other levels.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top