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: 
14,922
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
ramjee_gupta
Participant
0 Kudos
Helpful blog...
deshmukh
Participant

Hi Sayani,

Nice blog. but i have a question.

In Analytic Application (AA) we have charts and i want to pass the values selected/filtered in checkbox widget to those charts. Is this possible. Reason i ask this question is you mentioned "Mandatory Widgets" for checkbox and there i dont see any charts.

PS: My AA doesnt have a single table it only has charts and Geo map. So my checkbox selections should impact these widgets.

Please suggest.

Thank you.

anitadhale27
Participant
0 Kudos
Very Helpful.Thank you for  putting it so clearly and step by step.

I also reused it to get the dimension value list.
rambo_8143
Explorer
0 Kudos
Hi Sayani,

 

Very helpful. Thanks.

I just need to do the same as for the dimensions, because here you have done for measures and tried it, but for dimension is there any idea.

I tried it but "cant able to add the dimension" this was error thrown. kindly suggest and give some tips to make sure it will works efficiently...
rambo_8143
Explorer
0 Kudos
Will you get the dimension value list?

If so kindly suggest the same here to use it...

 
anandhu1234
Explorer
0 Kudos

Hi Sayani Ghoshal,

This blog was very helpful and appreciate your interest in analytical applications.

Is there anyway that we can change the table header names?

 

Labels in this area