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: 
With SAP focusing on moving towards cloud-based analytics, SAP Analytics Cloud is becoming one of the hottest tools in the SAP BI space. Given that SAC is more of a self-service solution on the cloud, there was a constant business need for a professionally authored dash-boarding tool on the cloud. SAP now has a solution for this – Analytics Designer.

Analytics Designer has a lot of features to make it interactive. For this it uses, tables, charts, various widgets and finally script logic to bind all these together.

In this blog, we will see how to use script logic for enabling checkbox and dropdown features in Analytics Designer.

A. Configure Checkbox feature in Analytic Designer: SAP Analytics Cloud

We will be using the checkbox to select the account dimension member and the table output should change dynamically as per the selection.

  1. Create a new Analytic Designer Application.





  1. Add the below objects in the canvas.


 


 

Once the structure is ready, we can proceed to include the script logic.

  1. Create two script variables of type String and set as array. This will be required to capture and store the check box selections.





  1. Create a Class and function (Argument: String[set as array] , Return Type: Void) in the script objects panel.





  1. Add the below logic in the script function to modify the table dimension as per checkbox selection.


   


 Note: Replace the table name and function argument as per the dimension name of your model.

  1. Go to edit script on the canvas and include below logic in ‘onInitialization’ function to retrieve the Account dimension members of the model.


       


Note: Replace the table name as per your configuration

 

  1. Edit the scripts of the buttons to execute the Checkbox functionality.


a. Button - Set All Measures

                   


                 b. Button - Remove All Measures

               


                 c. Button – Set Measure Filter

                           


To run this application, save it and click on Run Analytic Application Button.

Output: Table dimension should change as per the CheckBox selection.

 


 

B. Configure Dropdown feature in Analytic Designer: SAP Analytics Cloud

We will be using the drop down to select the account dimension member and the table output should change dynamically as per the selection.

  1. Create a new Analytic Designer Application.



 

  1. Add a table and a dropdown in the analytic designer canvas; you may also add a background image and a text box.


Table parameters: [Rows – Brand, Column – Account(Filtered on a member)]

           


 

Once the structure is ready, we can proceed to include the script logic.

  1. Create a Class and function(Argument : String , Return Type : Void) in the script objects panel.





  1. Add the below logic in the script function to modify the table dimension as per dropdown selection.


     


          Note: Replace the table name and function argument as per the dimension name of your model.

  1. Go to edit script on the canvas and include below logic in ‘onInitialization’ function to retrieve the Account dimension members of the model.


       


          Note: Replace the table name as per your configuration

  1. Edit the DropDown widget script to call the script function ‘App_Layout.setMeasureFilter’.


         


To run this application, save it and click on Run Analytic Application Button.

Output: Table dimension should change as per the dropdown selection.


 

 

 
6 Comments
Labels in this area