Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

Need urgent logic

Hi All,

I need below below resulting table. Kindly help with logic:

  

            Opened                            Closed               Result
November3 3
December4 7
January14120
February283183120
March559556123
April447418152

Logic for Result column is -

Initially it needs to set as value 3 (hard coded ok), later it should be

Result column = Opened - closed +Result

Please help me what expression and variables need to set to get above table.

Best Regards,

Mahamed

6 Replies
m_woolf
Master II
Master II

Something like:

load

     *,

     Opened - Closed + peek('Result') as Result

from MyTable

order by Date;

Anonymous
Not applicable

rangesum() would be better? or?

Mahamed_Qlik
Specialist
Specialist
Author

Hi,

I need this to be done on front end.

Because there is separate expression written for opened an closed column .

Mahamed_Qlik
Specialist
Specialist
Author

Can you please give me expression?

Anil_Babu_Samineni

May be this?

For last column, I used full accumulate

Capture.PNG

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
Anil_Babu_Samineni

Or May be expression this?

Rangesum(Below(Sum(Opened)-Sum(Closed),0),Above(Sum(Opened)-Sum(Closed),1,RowNo()))

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