Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
americanetsMD
Contributor III
Contributor III

Yearly cumulative per month

Hello Community, 

Could anyone please help me with an advice on how to calculate the cumulative sum based on the following formula:
Value3 = Value1(t0) - Value1(t-1)/ Value2

Having the following Test Data i should get the  results:

americanetsMD_0-1707581080042.png

AsOfPeriod     Value3

12.2022           36,08%

01.2022           -233,91%

02.2022          132,40%

and so on..

i currently use An AsOfTable in order to calculate Value1 and Value2, as these should be also cumulative sumed.

My problem is that i don't know how can i jump to december, when i have to calculate the value for january.

Could anyone please help me with an idea? OH, yes... the Above() doesn't help much, as i need this calculated in a line chart.

Will be really grateful if anyone can helpl me with any information. 🙂

Labels (1)
11 Replies
Anil_Babu_Samineni

@americanetsMD Can you please attach the QVF that you want to test and explain each one of your issues, so we will see!

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
americanetsMD
Contributor III
Contributor III
Author

Hi @Anil_Babu_Samineni - Thank you for your support. I have found the way to get the right values by using the AsOfMonth in combination with YearDiff and MonthDiff...

sum(Value1) -  sum({<MonatDiff -= {0}>} Value1)