###### Technical Articles

# SAP Analytics Cloud – Variance Reporting using Tables & Cross Calculation

**ℹ️**

Variance reporting is a very common requirement. Sometimes variance calculations are required across dimensions and sometime across category/ versions. Charts offers variance option out of the box. This option works for comparing dimensions as well as comparing numbers across category.

**⚠️ Known limitations:**

*Table widget do not offer out of the box variance functionality. We need to create calculated measure to create variance column. Now creating calculated measure may not be enough in scenarios where you want to compare numbers across category/ versions (e.g. actuals vs. forecast). Calculated measure only works with one category/ version at a time. This means if you use calculated measures only you may end up with these – Q&A : Calculation works only with one category*

**🏷️**More often than not, we see similar requirement and post on SAP Community. What seems to be very common and simple requirement may not have a straight setup process. Here are couple of examples:

Q&A : Variance Report between dimensions and version

Q&A : SAP Analytics Cloud: Variance between versions in table

Q&A : Calculation in table across versions

Q&A : Difference between Category Members

For someone who is starting SAC journey this may turn out to be little tricky. In this blog post, we are going to cover steps involved in Cross Calculation to create variance report in table formation. In-fact cross calculations are built for such requirements.

Adding Forecast and Actuals by Product Type. Adding forecast and actuals may not be exactly what you are looking for :). However, this will give you an idea how to setup your scenario.

**🏷️**This is how the final output would look like.

You can switch rows and columns as pre your requirement.

**📌 Steps**

- Add cross Calculation under rows.
- Locate under rows > Cross Calculation > More> Add Calculation > Restricted Measure for Actuals
- Create restricted measure for Forecast as well:

- Add another calculation under cross calculation. This time it should be Calculated Measure type. Like below-

- Now remove Account dimension from rows and leave Cross Calculation.
- You can change the order of individual Cross Dimensions –
- Now that restricted measure are appearing under calculation, you can calculate % contribution and other similar variance as well.

Thanks!

Indeed very common requirement and a very simple solution if you know the steps.

Crisp & clear blog - thanks for creating & enabling the community!

This workflow should be easier to achieve IMHO, even if implementation is feasible once you know it.

Best,

Antoine

Thanks Antoine

Hey Debjit Singha,

thanks for this blog post regarding variance calculations. Currently, I am facing another problem when calculating a variance. Perhaps there is also a suitable answer to this.

How can I calculate the variance between 2 versions dynamically if the version is not known to me before ?

Explanation: I have an official public forecast version for a planning application. In addition, users can create their own private version (for "what-if simulations "). Now the user wants to compare his own plan values with the original forecast via variance.

How can I compare his own private version with the public forecast version ? Since he created the private version later, there is no restricted measure.