###### Technical Articles

# SAP Analytics Cloud In-story Calculation Series – Blog8: Show the restricted values of all account members in different granularities of time

This is the last blog post of a blog series with the intention to guide you towards success with In-Story Calculation. If you are interested in learning more about In-story Calculation, please check out our blog series here.

**Scenario:**

Your finance department wants to dynamically view the restricted values of all account members in different granularities of time: current month, current quarter to date, and current year to date.

**In-story Calculations:**

- Cross Calculation

In most financial scenarios, there are numerous account members that need to be restricted by different granularities of time. For example, current month, current quarter to date, and current year to date, etc. However, it is time-consuming to manually create a dedicated Restricted Measure for each account member. To better address the requirement from your finance department, you can apply Cross Calculations such that your end users can get the desired results.

We start by selecting the Cross Calculations checkbox in the Builder panel:

We then select Add Calculation from the Cross Calculations column:

Next, we define 3 Restricted Measures for the current month, current quarter to date, and current year to date in the calculation editor respectively:

The below screenshot presents the result: besides the Account Values, there are 3 restricted results in different time granularities. This blog was written in April, the first month of Quarter two, so the results in column “Current Month” and “Current Quarter to Date” are identical.

We can also choose to Add Cross Calculation Input Control in order that your colleagues from the finance department can flexibly pick the time granularities and obtain the restricted results accordingly.

Please note that you need to uncheck all the newly created Restricted Measures in the filter for Cross Calculations. Otherwise, the “Add Cross Calculation Input Control” setting won’t work as expected.

The final view could look like this:

Now the filter for Cross Calculations should look like this:

Did you gain a deeper understanding of the Cross Calculation after reading this blog? Do you expect more examples for In-story Calculations of SAP Analytics Cloud? Leave a comment to share your feedback with us. Hope you enjoy this blog series!

* The product interface may vary depending on the product version

Hi Sharon

Thanks for the great blog!

Is there a way to cross calculate on aggregation and calculation measures instead of restricted measures?

For example, when you build a revenue table

(1) Make the data in the row a calculated measure. (Sales = unit price * quantity)

(2) Make the data in the columns a dynamic date period. (Current period, previous period)

(3) Calculate with each other. (Ratio to previous period = Current period / previous period * 100)

When I tried, I didn't get the right number in (3).

I'm sorry for the impatient English. Please tell me if you have any ideas.

Tomoki

Hi Tomoki,

Does the below screenshot meet your expectation?

In this example,

Sales(Calculated Measure) = Quantity Sold * 100

Current Year & Previous Year(Cross Calculation - Restricted Measure)

Ratio to the previous period(Cross Calculation - Calculated Measure) = Current year / previous year * 100

Let me know if you have questions.

Best,

Sharon

Hi Sharon

Thanks for the polite explanation.

Having done as you were told, I could solve it!

Best.

Tomoki

Hi Sharon,

thanks for your great Blog series. May I ask you about the following challenge which releated to the same case but a bit more complex? To Include Measures/Dimension in cross calulation calculated measures.

https://answers.sap.com/questions/13442488/sac-how-to-include-measure-value-into-cross-calcul.html

Thanks!

Best regards

Carsten

Hi Carsten,

Jay has explained why you cannot reference an account member in Cross Calculations under your question.

Based on the information you provided in your question, I haven't found a possible workaround yet. If you don't mind, you could share with me your story and model via sharon.zhou@sap.com. I can further look into this and let you know if a workaround exists.

Best,

Sharon

Update of Carsten's case:

Using SAC New Model may address this requirement.