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: 
madmax88
Creator II
Creator II

sum of Difference by Customer and months

Hi all,

I have following table:

CustomerMonthValuePerformanceNew Money
A100%0
A2500%50
A3500%0
B1100%0
B2100%0
B300%-10
C1500%0
C25510%0

These are Customers with Value (Deposit) and Performance. I need to findout where customer left their money, where it bring it to us.

Eg.

Customer A has a Value of null in jan but in Feb he has 50. So the target New Money is 50. In March it's 0

Customer B has a value of 10 in jan and feb so so New Money of Null. In March there is a value of 0. So New Money -10

Customer C has a Value of 50 in Jan and Performance 0-->New Money 0, in Feb Value of 50, but performance of 10% -->no new money (only Performance). In March he has Value of 60 and 0% performance. There he have now 5 New Money.

 

I Need now 2 the overall sum New Money over all months and in a table the overall sum by customer. Any idea?

 

3 Replies
albertovarela
Partner - Specialist
Partner - Specialist

Hello there,

One way is to use the peek function. Take a look at the attached qvf.  

Image.jpg

 

madmax88
Creator II
Creator II
Author

Hi

thanks for your input, but this is not working: The New Money is a value which has to be calculated. In your script you have it already. 

albertovarela
Partner - Specialist
Partner - Specialist

Take a look at the section "Calc New Money" in the script.  You will find the calculation there.