Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Month Wise Values

Hello All,

I am having a field say Total_CasualLeave which is static and predefined.

Now I have to show Day wise balance if he or she takes any CasualLeave.

Example:

NameDateTotal_CasualLeaveCL TAKENClosing CL Balance
A21st May1019
A28th May909
A18th June727

What is the solution and How I can solve it?

Regards,

Balraj

5 Replies
MK_QSL
MVP
MVP

Provide some more information on your data model or tables...

10 - [CL TAKEN]

Anonymous
Not applicable
Author

Manish,

I am having a LeaveLedger table which is having static/Fix set of leave defined for a person.

In other table LeaveRequest with fields like(LeaveDate, LeaveCode, NoOfLeaveDays etc), which keep the track if any person have taken any leave.

Let me know if you required any other info?

Regards,

Balraj

Anonymous
Not applicable
Author

Here is table details:

LOAD PAYCODE,

         L01_ADD as Total_CL(Allotted for a Year),

         L02_ADD as Total_SL,

         L03_ADD as Total_EL,

         LYEAR

         from LeaveLedger;

Another table is:

LOAD PAYCODE,

     //request_date,

      leave_from,

      leave_to,

      leavecode as LEAVECODE,

      leavedays

from LeaveRequest;

With these info I need to drive above result.

Pls suggest.

Not applicable
Author

HI Balraj,

You can resolve this by fallowing code,

Load Name ,

              Date,

             Total_CasualLeave as [Total casual Leaves],

            Total_CasualLeave - previous(Total_CasualLeave) as [Leaves Taken] ,

            Total_CasualLeave - (Total_CasualLeave - previous(Total_CasualLeave)) as Leave balance

from Table Orderby Date ;

I hope it helps...........

Anonymous
Not applicable
Author

Koti,

Thanks for your reply.

But Total_CasualLeave is a fix value field for each employee, it is not changing by date.