on 2025 Dec 08 12:13 PM
Hi everyone!!
I’m working on a requirement in SAP Analytics Cloud where I need to use a single Posting Date input control to filter two different tables in a story. The first table should display data for the exact month selected by the user through that input control, while the second table should automatically show data for the same month in the previous year. Both tables use the same dimensions—G/L Account and Posting Date—and the measure Amount in Company Code. For example, if the user selects January 2025, the first table should show January 2025 data, while the second should show January 2024 data.
The challenge is that SAC applies the input control directly to the Posting Date dimension for both tables, and I need a way to “offset” the Posting Date filter by one year only for the second table. I’m looking for the best approach to achieve this, any SAC feature that allows filtering one table based on a previous-year version of the selected date. If anyone has implemented something similar or knows an efficient workaround, I would really appreciate your guidance.
Request clarification before answering.
If you want it with a input control, it will have to be a story filter. Select your 1st table and then filter on your date but use the Filter by Range option:
When the range option comes up. select Date Type and use Create Custom Date:
Name your data selector and change the Granularity to Month and when you want to start the selection box:
In the Range, make sure the Granularity is Month for your selection:
This will place a story filter on your story and the 1st table will be filtered based on that selection:
Now edit your 2nd table, click on the Date dimension and again selected, Filter by Range:
In the Date Type make sure to select your new Custom "Select Date" member, then in the Range area
Change the Range Type to Offset and set the Granularity to Month with zero look back or look ahead, then in the Look Back Direction, select Offset Granularity to Year and put 1 in Offset Amount, it should already show you its is selecting the prior year same month:
You can then click on the select date filter and choose your needed monthly period
When the tables update, they will be current month selected and same month prior year.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @AhmadAzaanFarooqui ,
Please refer to the below blog for your query.
https://community.sap.com/t5/technology-blog-posts-by-sap/dynamic-mtd-qtd-ytd-calculation-in-sac-sto...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One option is that you can create restricted measure based on dynamic time offset to previous year for the second table. The other option is that you can use scripting to read the Input control selection , offset it by a year and then pass it as a dimension filter to the second table.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.