cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated Measures Subtracting Data from Different Months

Ganjos
Participant
0 Kudos
281

Hi,

We are currently facing a problem with two Excel files that contain the same measures but yield different results. I want to create a calculated measure that subtracts "dotacoes" for February 2024 (202402) from "dotacoes" for January 2024 (202401). However, I am unable to access the measure "dotacoes" for both February 2024 (202402) and January 2024 (202401) in order to perform this subtraction.

Could you assist me in resolving this issue?

Thanks in advance!

GAnjos

Accepted Solutions (0)

Answers (1)

Answers (1)

Ganjos
Participant
0 Kudos

 

Hi,

Thank you for your previous answer.

I have an Excel file that was provided to me, and I have analyzed it and built the model. However, the data is accumulated, and I want to perform calculations to derive the monthly values. For example:

  • For January 2024 (202401) -> 200
  • For February 2024 (202402) -> 400 - 200
  • For March 2024 (202403) -> 700 - 400

I want to access the value of 400 from February 2024 (202402) and subtract 200 from January 2024 (202401).

I attempted to create nested IF statements like this:

if([d/date]=202402,[dotacoes]-[dotacoes],if([d/date]=202402,[dotacoes]-[dotacoes],if(.....))

 
IF([d/Date] = 202402, [dotacoes] - [dotacoes], IF([d/Date] = 202401, [dotacoes] - [dotacoes], IF(...)))

However, I am unable to access the values of "dotacoes" for 202402 and 202401 to perform these subtractions.

Thank you!

radinator
Participant
0 Kudos
Hi again, for me it's not entirely clear how exactly you access the excel file. May you add some code you already made?
radinator
Participant
0 Kudos
Additonally it would be very helpfull what the current "error" is. Do you get any value extracted or do you just get "no value" at all. Like the value '0'? Kind regards
Ganjos
Participant
0 Kudos
I am using SAP Analytics Cloud to import the file. I haven't written any code
radinator
Participant
0 Kudos
If you apply one of the calculations, do you an actual error messsage or do you just get a zero value?