- SAP Community
- Products and Technology
- Technology
- Technology Q&A
- SAC Calculate after aggregation based on dataspher...

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

SAC Calculate after aggregation based on datasphere

Charlielin

Explorer

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

a month ago - last edited 4 weeks ago

428

- SAP Managed Tags:
- SAP Analytics Cloud,
- SAP Datasphere

Dear Expert,

I am trying to calculate the difference of GP% between current year and last year. But the formula behave kind of weird. Here is our sample data:

We have calculated the GP% for 2024/08 and 2024/07 in the Analytic Model of Datasphere and it worked just fine(Green). But when it come to SAC story to **calculate difference of 2 years**, instead of simply minus one from the other, it seem to firstly calculate the difference of each SALES/COST/GP(Orange) and then calculate GP/SALES(Red) which is wrong. What we need is the calculation after aggregation which is just simply 0.42 - 0.37.

Any suggestion?

We are using live connection from SAC to Datasphere, I've tried to create calculated measures both in the view and analytic model but neither of them worked.

**Appendix 1: Using Exception Aggregation for all fields in the Analytic Model**

Labels:

Savio_Dmello

Active Participant

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

a month ago

In SAC, with a live connection to Datasphere, some calculations might behave differently because SAC delegates most of the calculations to the source (Datasphere in this case), and it may not behave as expected in aggregation contexts.

Try this, Go to your story, select the measure that holds GP%, and create a new calculated measure. In the formula editor, ensure that you're working with **aggregated measures**. The formula for GP% should be something like: (sum(GP) / sum(SALES))

Then, you can create a new calculated measure to compute the difference between two years:

[GP% for Current Year] - [GP% for Last Year]

If SAC continues calculating GP% incorrectly despite the changes in the story, you might want to pre-calculate the GP% at the aggregated level in the SAP Datasphere model.

In Datasphere, create a calculated column for GP% that aggregates Sales and Costs before calculating the GP%.

Charlielin

Explorer

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

a month ago

Ask a Question

Related Content

- Considerations on Performance Classes in SAP HANA Cloud in Technology Blogs by SAP
- SAC Calculate after aggregation based on datasphere in Technology Q&A
- How to consume calculated member in Advanced Formulas. in Technology Blogs by SAP
- European Sustainability Reporting Standards(ESRS) Journey With SAP Sustainability Control Tower(SCT) in Technology Blogs by Members
- Datasphere performance issue in Technology Q&A

Top Q&A Solution Author

User | Count |
---|---|

71 | |

11 | |

10 | |

10 | |

10 | |

8 | |

7 | |

7 | |

5 | |

4 |

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.