Skip to Content

SAP Design Studio - Getting the measure and filter with it

Hello dear community,

I have a question about how I can get the measure and filter with it.
In Design Studio I have a normal bar chart, where I show aggregated values with 3 measures, see below picture.

On the horizontal axis I have values called "OEsG" and on the vertical axis I have the count.
My goal is to get the measure I clicked.

For example: If I click the green bar of the OEsG = 'Sonstige', it should write the selected measure text (in this case it is "WSA bis 3 Monate") into a text box.

My idea was:

TEXT_1.setText( DS_BAR_CHART.getSelectedMember ("OEsG") );

But this just gives me the VALUE of the OEsG, but what I want is to write the name / text of the measure ("WSA bis 3 Monate" into a text box and then use it as a "filter".

tiuuc.png (12.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 06, 2017 at 12:55 PM

    Hi - I recommend looking at Karol's blog about formatter function here: - this looks like what you may be looking for - his example is a crosstab

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 06, 2017 at 02:09 PM

    Hi Vu,

    Your requirement is perfectly clear, in that you want to obtain the selected measure, as is your observation that getSelectedMember() only returns the chart category axis dimension member value. Unfortunately, your requirement is not supported by the standard Stacked InfoChart. There is no possible way to obtain the selected measure.

    I would suggest you review the Partner chart extensions for Design Studio in the SAP App Center.

    *** UPDATE ***

    You can ignore my previous comment. I had an epiphany overnight and realised you can indeed achieve your requirement. You simply need to specify the Measures Dimension in getSelectedMember() instead of the Axis Category Dimension. The steps are as follows:

    1. Create a Global Variable called myMeasure;

    2. In the "On Select" event script of your chart, apply the following code:

    myMeasure = me.getSelectedMember(<Measures Dimension ID>); 

    3. To use the selected Measure as a filter, apply the following code in the "On Click" event of the text box:

    DS_1.setFilter(<Measures Dimension ID>, myMeasure.internalKey);



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Mustafa,

      thanks for your quick reply again.

      I'm sorry for asking an answer here, next time I will do it as you said.

      I have read the post you referred to but I still don't understand how to do that.

      Can you help me here? I don't understand what to do, can you give me a step-by-step-"tutorial"?

      The biggest problem I have here is the editing of the .css-File.

      I don't know what to put in that file.

      The scripting in Design Studio is no problem for me.