Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
joyal_laj
Participant
Suppose we want to list the members of a dimension in the click of a dropdown in SAP Analytics Cloud (SAC). Is it possible to do that in SAC? If yes, How can we do this?

The answer is yes we can do this. How? We will see this in this blog post.

The second query is to filter a table according to the dimension member selected.

We can fill in the members of a dimension inside a dropdown and filter a table according to the selected dimension member using scripting in SAP Analytics Cloud.


Scripting in SAP Analytics Cloud


Scripting in SAP Analytics Cloud is possible only in Analytic Application in SAP Analytics Cloud. Scripting in SAP Analytics Cloud is a vast topic. Here we are only covering the scripting required for the topics mentioned in the blog post.

Step 1: Creating an Analytic Application : Click Create >> Click Analytic Application

Step 2 : Add the Widgets Drop Down and Table to the canvas


Analytic Application Layout



Analytic Application Canvas After adding Table and Dropdown


Step 3: While hovering above canvas, Click on fx to write script on initialization of the application so that we can load all members of dimension in the dropdown on initialization of the application.


 

Let's see the Sample Code:


Sample Code


After saving this code and clicking the button Run Analytic Application, Members of the particular dimension will be listed in the Dropdown. Here I have listed all members in the Dimension Bike.

Now let's add the dimensions in the Table and Label to the Dropdown.



Here we haven't used any styling. You can add it as your requirement.

Our next requirement is to filter the table according to the selected member in the dropdown. i.e here, if we select Bike A in dropdown, the table should be filtered with Bike Type Bike A.

Step 4: While hovering above Dropdown_1, Click on fx to write script onSelect().


 

Let's see the Sample Code:


Sample Code


Now click on Run Analytic Application, you will find all our requirements satisfied.


Conclusion:

Scripting in SAP Analytics Cloud is a vast topic. Here we have only covered the scripting required for the topics mentioned in the blog post. Hope all of you got a better understanding about the content mentioned in blog post. Please feel free to shoot out any mistakes in the blog post through your valuable comments.
24 Comments
Labels in this area