Scripting Logic
SAP Analytics Cloud scripting
Provides programmatic control over measures, values, and calculations at runtime.
Using scripting, developers can format numeric outputs precisely, manipulate raw and formatted values, handle nulls and zero-suppression safely, and apply conditional logic based on numeric thresholds or measure results.
This section focuses on common scripting patterns that you will regularly use
Script Examples
-
Sort a table by measure values
-
Write the full result set of a Table to the console
-
Measuring Distribution Inequality in SAP Analytics Cloud Using the Gini Coefficient and ResultSet Scripting
-
Pareto 80/20 Script with Top Contributor Insight
-
Detect 80/20 Value Concentration in SAP Analytics Cloud Using Pareto Analysis
-
Detect Statistical Outliers using Z-Score and ResultSet
-
Get dimension ids in specific rows and write them to a text box
-
Retrieve a measure name and write it to a text box
-
Retrieve the first value from the result set and write it to a text box with dynamic scaling
-
Write the Standard Deviation to a text box (with dynamic numeric scaling)
-
Write the Coefficient of Variation to a text box
-
Write the spread between the highest & lowest value to the text box with dynamic numeric formatting
-
Retrieve the average value from a Resultset and write it to a text box
-
Retrieve the lowest value from a Resultset and write it to a text box
-
Retrieve the highest value from a Resultset and write it to a text box
-
Nested Else If Condition basic example
-
Stop a For IF loop when a specific condition is met
For broader context on SAC scripting concepts, see our SAP Analytics Cloud scripting resources.
