What-If-Simulation in a SAC Story based on a SAC Live Model (e.g. SAP BW/4HANA)

 7 months ago
source link: https://blogs.sap.com/2022/06/16/what-if-simulation-based-on-a-sac-live-model-based-on-sap-bw-4hana/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
June 16, 2022 3 minute read

What-If-Simulation in a SAC Story based on a SAC Live Model (e.g. SAP BW/4HANA)

0 3 208

Hi SAC Fans,

This time a short SAC Blog but I think it will be useful for some Story Designers. 🙂

I have received the question if it is possible to create a What-If-Simulation in a SAC Story based on a SAC Live Model (in my example SAP BW/4HANA).

I can think of different ways to solve this. Just a few examples:

  • Work with formula variables in the SAP BW Query. They can be used in a SAC story and can be changed via runtime.
  • Create a Analytics Designer application.
  • Stay in SAC Story mode and do not touch the SAP BW query.

Let’s take the easiest way and work with a SAC Story.

Our initial SAC story looks like this:

You can see in the table that the SAP BW Query has the measure “Profit” inside which is fine.
In addition you can see the dimension “Sales Person” in the rows.

What we need to do is to create a new calculation. Let’s start:

In the next step we will define our calculation. Let’s take the “Profit” measure from the SAP BW Query into the formula editor:

Now we need to multiply the Profit with content from an “Input Control” (that’s the trick). We need to add one:

In the next step we will give our Input Control a name. I call it “Bonus Simulation“.
We use a “Static List” and in the next step we select “Select by Range“:

The range should be between “0” and “100“. As increment we enter “1” and then we click on “OK“.

The screen should look like in the following screenshot. Click on “OK” and leave the editor.
In the next step we include the input control into our formula:

Finish the formula and enter a name for the new calculation (e.g. Bonus Calculation). Click on “OK” to leave the editor:

We can see that the new calculation is available in the table. And we can see the input control which we need to resize and move under the table.
The next step is easy for all who are familiar with SAC.

I move the input control under the calculation in the table.
Then I change the size, the background color, the text color, remove the symbol (via “Show/Hide” by using the context menu of the input control) and it should look like this.

If we now move the slider, the values will change according to our selection.
Our “What-If” simulation works already and the bonus will be calculated according to the selected value. Please note that the values 1 to 100 represents percentages (e.g. 10 % bonus).

But as we need to visualize our data as well, let’s add a chart and format it a little bit.
As measure I select our newly created “Bonus Calculation” and as dimension the “Sales Person“.


If we now change the input control, the change will be shown immediately in the table and in the chart.


And that’s it. We have created a Bonus What-If Simulation based on SAP BW Live data in SAP Analytics Cloud. I took this easy example to illustrate how it works. Of course you can realize more complex simulation scenarios.

The following video shows the result:

You can do much more by working with this approach and with less effort your dashboards can be really interactive. Hope you like this approach and will use it in your dashboards.

Best regards,

Note: Big thanks to my colleague Blaz Zabukovec. We just talked about this request today and I wrote down the steps in a blog.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK