Skip to Content
avatar image
Former Member

Drilling in Pie Chart with a Hierarchy dimension from BEx in Design Studio

Hi All,

Design Studio ver 1.6 SP2

I have a dimension 'ProfitCenter' coming from a BEx query along with corresponding Sales.

Europe (Level 1)
- Germany (Level 2)
- France (Level 2)
- Italy (Level 2)
Asia (Level 1)
- India (Level 2)
- China (Level 2)
North America (Level 1)
- USA (Level 2)
- Canada (Level 2)

The default Pie shows sales for all Level 1s which is OK.

My question is how can I now drilldown in the same Pie to show Level 2s.
Ex. When I click on Europe, the Pie should show only slaes for all its level 2s (Germany, France, Italy).

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 20, 2017 at 11:32 PM

    Hi Chalfont,

    Your scenario is a common request which unfortunately is not currently supported in the standard charts. The issue is discussed in quite some detail in the post Hierarchy problem with charts - Open Hierarchy nodes visible. In addition to Agata's suggestion, the post includes several other workarounds depending on the particular use case but there isn't really an all-encompassing clean solution available at the moment. There is a comment in the post that this requirement is on SAP's backlog but it is yet to be delivered.

    You may also wish to evaluate the partner charting components on the SAP Analytics Extensions Directory for this feature.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 20, 2017 at 03:46 PM

    I don't know if there is a proper way of doing this, because when I try to recreate your issue, my PieChart is showing me Level 1 but also the top level 0 - I need to exclude it from view in the Chart's Data Selection to see just Level 1s. So I guess PieChart is not clever recognising hierarchy nodes, as one would expect.

    But if your Profit Centre hierarchy is as simple as the one above, I would use JavaScript to drive my Pie Chart:

    if (INFOCHART_1.getSelectedMember("0PROFIT_CTR").text=="Europe") {

    INFOCHART_1.setDataSelection({"(MEASURES_DIMENSION)":"00O2TFZLON3KAMGYC50MHY68G","0PROFIT_CTR":["Germany","France", "Italy"]});


    else if (INFOCHART_1.getSelectedMember("0PROFIT_CTR").text=="Asia") {

    INFOCHART_1.setDataSelection({"(MEASURES_DIMENSION)":"00O2TFZLON3KAMGYC50MHY68G","0PROFIT_CTR":["India", "China"]});


    else if (INFOCHART_1.getSelectedMember("0PROFIT_CTR").text=="North America") {

    INFOCHART_1.setDataSelection({"(MEASURES_DIMENSION)":"00O2TFZLON3KAMGYC50MHY68G","0PROFIT_CTR":["USA", "Canada"]});


    Instead of "text" property, you can use internalkey. Internalkey is what is displayed in the Chart's Data Selection so have a look there if you are not sure how to use it. You will see something like "HIERARCHY_NODE/0HIER_NODE/RGN_EUROPE. The above code definitely works with internalkeys, I am using text just to ilustrate the logic.

    Problem is, if your scenario is more complex than this, then it's hard to use JavaScript for what you are trying to do.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 21, 2017 at 09:48 AM

    Thanks to both Agata and Mustafa. Your solutions and comments were really helpful.

    Add comment
    10|10000 characters needed characters exceeded