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

Syntax of Expression

Hello All,

I am having following table:

Temp:

load

    PAYCODE,

    L01_ADD as Total_CL,

    L02_ADD as Total_SL,

    L03_ADD as Total_EL,

    application_no as App_No,

    request_id as Request_ID,

    leave_from as Leave_From,

    leave_to as Leave_To,

    leavecode as LeaveCode,

    leavedays as NoOfLeaveDays

    //if(leavecode='CL', sum(leavedays),'0') as [CL Accrued]

    Resident LeaveLedger;

Now, I need to do some expression calculation at back end, I am trying with some expression but it gives me error.

I need to calculate following fields at back end in this table:

Accumulated Casual Leave= sum(Total_CL)

CL Accrued=if(leavecode='CL', sum(leavedays),'0')

Closing CL Balance= Sum(Total_CL)-if(leavecode='CL', sum(leavedays),'0')

Please suggest, if possible at backend.

Regards,

Balraj

13 Replies
Gysbert_Wassenaar

See attached qvw for calculation of the XX_Accrued fields.

I have no idea what Accumulated Casual Leave = sum(Total_CL) is supposed to be. For paycode 3001 the sum of Total_CL is 5782. Surely that cannot be a number of leave days?


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

True, It is not number of leave days.

Total_CL is a static field which holds the predefined leave balance for a particular paycode.

Anonymous
Not applicable
Author

Gysbert,

I am not able to download this file, showing "failed to open this file".

Gysbert_Wassenaar

Try again. Or try again using a different browser or from a different computer. I can download it without problems.


talk is cheap, supply exceeds demand