Skip to Content

Top 10 and the remaining Items in a pie chart

Hi All,

I am trying implement a pie chart that shows top 10 Items and the remaining items grouped as others in the same chart. I understand it can be done for a chart (there is an option in its property)

But My dashboard is in UI5 M mode. hence there is no Chart component. and i am using infochart component. and i don't see any such option for infochart.

Do i have to manually find out the top 10 and the remaining Items and use it in Infochart.

Is there any easy option for it in Infochart as well.

I am using Bex query. Its not possible to implement top and group the remaining as others in the same query.

Please share some ideas.

Swapna

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Nov 14, 2017 at 01:53 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 15, 2017 at 08:30 AM

    Hi Swapna,

    The technique described in the following post should address your requirement:

    https://blogs.sap.com/2015/08/14/how-to-visualize-others-in-sap-businessobjects-design-studio/

    Regards,

    Mustafa.

    Add a comment
    10|10000 characters needed characters exceeded

    • HI Mustafa,

      Thanks for the inputs. I tried with the approach mentioned in link.

      The approach works fine on the start up of the dashboard.

      later if i change the filter it not working.

      Example. On startup event of dashboard i have set the filter to filter say PLANT=7080.

      i have some filters in the dashboard which the user can change and view the data.

      So every time user changes the PLANT to some value. the code should find out the top 10 and the rest for the selected plant.

      in On select event of Plant filter i am writing the same code which i used in the start up to get result from final query. But its not working could you please share some ideas,

      With the below code, I can the top 10 query results are changed according to filter. BUt the same are not passed to the next query to find out "Other"

      DS_2.setVariableValue("DCVTUMPL", PLANT.getSelectedValue());
      DS_3.loadDataSource();
      var topcustomers=DS_2.getMembers("ZMATERIAL", 10);

      topcustomers.forEach(function(element, index) {

      if(index==0)
      {
      APPLICATION.setVariableValue("ZZMATOUO1", element.internalKey);
      }
      if(index==1)
      {
      APPLICATION.setVariableValue("ZZMATOUO2", element.internalKey);
      }
      if(index==2)
      {
      APPLICATION.setVariableValue("ZZMATOUO3", element.internalKey);
      }
      if(index==3)
      {
      APPLICATION.setVariableValue("ZZMATOUO4", element.internalKey);
      }
      if(index==4)
      {
      APPLICATION.setVariableValue("ZZMATOUO5", element.internalKey);
      }
      if(index==5)
      {
      APPLICATION.setVariableValue("ZZMATOUO6", element.internalKey);
      }
      if(index==6)
      {
      APPLICATION.setVariableValue("ZZMATOUO7", element.internalKey);
      }
      if(index==7)
      {
      APPLICATION.setVariableValue("ZZMATOUO8", element.internalKey);
      }
      if(index==8)
      {
      APPLICATION.setVariableValue("ZZMATOUO9", element.internalKey);
      }
      if(index==9)
      {
      APPLICATION.setVariableValue("ZZMATOUO11", element.internalKey);
      }
      });

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.