Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil-kumar5
Creator II
Creator II

Calculation on previous columns

Hi Team

below is my data model

sunilkumar5_0-1643780479964.png

and based on that I need to create a table per below

username targetmonth sum(invoice_value) amount calculation
A Oct  76000 50000  
A Nov 100000 200000  
A Dec 76000 50000  

 

Now I need the value in calculation column and the logic is

if(amount > sum(invoice_value), sum(unit*price),'NA')

now the thing is sum(unit*price) should only calculate unit and price when it start meeting the amount from the sale date , lets say user meet the amount target on 15th of dec than sum(unit*price ) should start after 15th not for all days.

for dec the total sum(unit*price ) is 7000 however after meeting the amount it should start after 15th dec and come to 4000

I am not sure if I was able to clear it out

Thanks

0 Replies