Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert
This is the first blog of SAP Analytics Cloud In-story Calculation Series. If you are interested in this topic, you can click here to have an overview of the whole series.


Your sales department would like to investigate in the year-to-date sales and compare it with year-to-date sales of last year.

In-story Calculations:

  • Quick Time Calculation

  • Restricted Measure

Method 1: Quick Time Calculation

You can use either Quick Time Calculation or Recommended Comparisons to perform this common calculation with a few clicks!

Add a Time Dimension to Chart

Let’s take a look at a Quick Time Calculation in action. You can add a time-based dimension to the chart, SAP Analytics Cloud will enable Quick Time Calculation in the selected measure.


Choose “Year to Date” Calculation

In this case, we choose the “Year to Date” calculation. Then we can adjust the chart view based on the business needs.  Some common adjustment includes selecting hierarchy and setting filters.


Select Recommended Comparisons

With SAP Analytics Cloud, comparing sales performance in current and last year can be done easily and quickly. By clicking on the Recommended Comparisons, SAP Analytics Cloud generates instant insights based on our dataset. Here we select “Previous Year”, then we will be able to see the comparison chart.



Method 2: Restricted Measure

After introducing method 1 - Quick Time Calculation, which is a “shortcut” to obtain your desired result, I am going to illustrate a more comprehensive way for you to achieve the same result as method 1.

Create Restricted Measure

The basic concept of this method involves first restricting the sales data to only show the running total results of the current and last year respectively and then using variance to make comparisons between them. Now let’s create two restricted measures in action.


Create Variance

By comparing these two restricted data and styling the variance, the bar chart below indicates that we have obtained the same result as method 1.


Results of Method1 and Method2


At this point, I bet you have learned something new about SAP Analytics Cloud. Do not hesitate to experiment with your dataset right now! Come back here and share with us your experience with the in-story calculation functionality.

The next blog post will talk about how to use In-story Calculation to create a what-if scenario: simulate quantity sold under different discounts.

Don’t hesitate to follow this series if it’s useful for you!



* The product interface may vary depending on the product version