cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAC - Previous years calculation for account dimension

adriano1973
Explorer
0 Kudos
842

Hi Experts, 

I have a problem in SAP Analytics Cloud SAP Analytics Cloud, data modeling with  previous years calculation for account dimension.

Modeling

I have a fact model with AccountCode and Balance information of P&L, and a Public dimension of type account that contains all the list of accounts included EBT account, on which I need to show in a dashboard the running values of last 2/3 years by month since actual year (as example if year is 2024 and I need to show 2021 / 2022 / 2023 values by month).

Dashboard

In the first attachment I created a dashboard where I show the year 2024, but I cannot find a way to calculate and show the previous years (as horizontal line I should have only the 12 months)

 

adriano1973_0-1736948812183.png

 

In the second attachment I show the Running EBT total formula I used in the dashboard

 

adriano1973_1-1736948847471.png

 

Question

How can I change or add formulas to obtain my achieve? In this case I want to show 3 lines of different colour each one about Running EBT Total of that year

 

It would be great if someone can help here! 

Thanks in advance!

 

Accepted Solutions (0)

Answers (1)

Answers (1)

William_Yu1
Product and Topic Expert
Product and Topic Expert
0 Kudos

You may create either calculated account or calculated measure with sequence: 

  1. YTD(2024)- restricted measure on base measure with navigation -> To Date -> Year
  2. YTD -1 (2023) - restricted measure on measure YTD with navigation -> Previous -> Year 
  3. YTD -2 (2022) - restricted measure on measure YTD -1 with navigation -> Previous -> Year 
adriano1973
Explorer
0 Kudos

Thank you William,

I tried your suggest and it worked.

adriano1973_0-1737020179292.png

The only thing I ask you is if it's possible to change dinamically the labels of the lines, as you see actually the names I set are RunEBT-2 and RunEBT-1, and so due that the year chosen below is 2025, it means that the blue line refers to 2023 and the orange refers to 2024.

Due that the starting year is dynamic (chosed by a story filter), it should be better instead that the labels should be renamed dinamically, that is if I choose year = 2025, I'd like to see "RunEBT 2023" for blue line and "RunEBT 2024" for orange line.

Is it possible in any way?

Thank you for your reply

 

 

William_Yu1
Product and Topic Expert
Product and Topic Expert
0 Kudos
As far as I know it's not possible.