Enhancing SAC Dashboards with Simple Scripting for Interactive Measures

Saturday, Nov 23, 2024 5:47 am ET1min read

This article discusses how to enhance dashboards and reporting in SAC using scripting inside the Optimized Design Experience (ODE). By adding a simple script, users can switch between different measures of a chart, reducing the number of charts on the page while maintaining performance and user engagement. The article provides a hands-on example and step-by-step instructions for implementing this feature.

The world of finance and business intelligence is constantly evolving, and with it comes the need for more interactive, engaging, and efficient dashboards and reports. In this article, we will explore how to utilize scripting inside the Optimized Design Experience (ODE) in SAP Analytics Cloud (SAC) to enhance dashboard functionality and reduce the number of charts on a page.

According to a blog post by SAP [1], the new ODE in SAC will revolutionize the way we create and interact with dashboards and reports over the next few years. While the possibilities of scripting are virtually endless, not all front-end story builders are experts in SAC coding. However, with simple additions and hands-on examples, we can make our dashboards more interactive, performant, and less static today.

Let's dive into a practical example of how to switch between different measures of a chart using scripting. In our use case, we want to display both the actual headcount (#) and the share compared to the total workforce (%). Instead of enabling the actuals by tooltip or adding a second set of charts, we will use scripting to give users the option to switch between the two measures using a switch.

Step 1: Chart Set-Up
Start by setting up your chart with the measure you want to be shown initially. This will be the headcount (#) in our example.

Step 2: Insert a Switch
Next, insert a switch to the position you want it to be used. We recommend adding images next to the switch to make the usage clearer.

Step 3: Edit the Switch Script
Open a new tab in your story named after the switch and the "OnChange" event. In the script editor, indicate the switch name (e.g., "headcountSwitch") and the chart name. Afterward, select the respective measures. In our case, the share is a calculated measure and will be shown with its dimension ID instead of a name.

Step 4: Write the Script
Save your story and enter view mode to see your changes. With these five simple steps, you can make your story or dashboard more interactive and user-friendly, as well as more performant and insightful.

There are numerous other use cases for scripting in SAC, and we encourage you to explore these possibilities to further enhance your dashboards and reports.

[1] SAP. (2021, February 10). SAC switching measures of a chart in a new ODE story. Retrieved from https://community.sap.com/t5/technology-blogs-by-sap/sac-switching-measures-of-a-chart-in-a-new-ode-story/ba-p/13578692

Comments



Add a public comment...
No comments

No comments yet