Data and Analytics Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 

Introduction:

When working with live reports in SAP Analytics Cloud (SAC), you may encounter a common challenge: there is no out-of-the-box way to dynamically display a user-selected input parameter value inside a column header. This can make reports feel static and reduce clarity for end users. In this blog, I will walk you through a practical step-by-step workaround using CDS views, input controls, and a small initialization script to bridge this gap and deliver a dynamic, user-friendly reporting experience.

Problem Statement:

In SAP Analytics Cloud (SAC) live reports, there is no standard functionality to dynamically display a user-entered input parameter value in a column header. However, the following workaround can be used to achieve this requirement.

Step-by-step approach

SAC Workaround .png

 

 
Step 1
Expose the input parameter as a CDS field.
In your CDS view, add the required input parameter as a field so that it can be consumed as a dimension in SAC.
 
Step 2
Create a calculation input control within a calculated measure. Ensure that:
  • The input control is created using the input parameter exposed via the CDS field in Step 1.
  • The input control is set to single selection.
Step 3
Use the input control created in Step 2 as dynamic text in the measure.
Within your calculated or restricted measure, use the input control as dynamic text. This allows the selected variable value to appear in the column header at runtime.
 
Step 4
At runtime, users can select any value in the input control selection. However, this value is not automatically reflected in the input control created in Step 2.
To ensure the input control is set correctly, add the following script to the page's On Initialization event to assign the selected value to the input control.
Input_Control1.getInputControlDataSource().setAllMembersSelected();
var SelectCurrentYear = Input_Control1.getInputControlDataSource()
    .getActiveSelectedMembers()[0].id;
Input_Control1.getInputControlDataSource()
    .setSelectedMembers(SelectCurrentYear);
 

Conclusion

In this blog, we covered a practical workaround to display dynamic input parameter values in SAP Analytics Cloud live report column headers — something that is not supported out of the box. By exposing the input parameter as a CDS field, linking it to an input control, and using a short initialization script, you can create reports that feel truly dynamic and context-aware. I hope this tip saves you time and enhances the usability of your SAC stories.
2 Comments