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: 
Anonymous
Not applicable

Need Immediate help on following KPI

Dear All,

I am having following fields: EmpName, LeaveMonth, Total_CasualLeave, Total_SickLeave(Predefined), LeaveCode, LeaveDays etc.

Now I have to generate a Report(Need_To_Achieve Sample is attached) which will show a leave balance of a employee on daily basis.

I have calculated following fields:

Accumulated CasualLeave= sum(Total_CasualLeave), same for rest.

CL Accrued= if(LeaveCode='CL', sum(LeaveDays), '0'), same for rest

Closing CL Balance= sum(Total_CasualLeave) - if(LeaveCode='CL', sum(LeaveDays), '0'), same for rest

After start of leave balance of a employee, I want next time it should be replace by his/her Closing balance on daily basis.

Example:

EmpName, Calender,            Acc. CL Balance, Accu SL Balance,   CL Accrued, SL Accrued, Closing CL Balance, Closing SL Balance

aaa            2th Aug 2014              10                     10                       2                 0                   8                                  10    

aaa            11th Aug 2014             8                        10                      0                 2                   8                                   8

aaa             18th Aug 2014             8                         8                      1                 0                    7                                  8 and so on....

Need your help guys.

Regards,

Balraj

4 Replies
Gysbert_Wassenaar

See attached qvw.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Gysbert,

Thanks for your reply.

But these CL Accrued, SL Accrued, Closing CL Balance, Closing SL Balance etc all are having expression which are getting calculated from multiple fields and tables at the expression level on the chart object.

Calculating them at script level is not working as I am calculating single value from multiple fields.

Total_CasualLeave, Total_SickLeave(Predefined) in Tab1 and LeaveCode, LeaveDays in Tab2.

Is their any solution which I can use at expression level or would require your help to do it at script level.

Pls suggest.

Regards,

Balraj

Gysbert_Wassenaar

Maybe you can use the above() function, or one of its siblings before(), after(), below().


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Could you suggest me how I can use above() function here and with which expression??

Accumulated CasualLeave= sum(Total_CasualLeave), same for rest.

CL Accrued= if(LeaveCode='CL', sum(LeaveDays), '0'), same for rest

Closing CL Balance= sum(Total_CasualLeave) - if(LeaveCode='CL', sum(LeaveDays), '0'), same for rest

After 1st transaction of a Faculty my closing balance of that transaction would be Accumulated Balance of next transaction.

I hope you have clear understanding after gone through the Excel which I need to achieve.

Regards,

Balraj