Sumif condition - Appsheet Style

I am trying to create a formula in a virtual column for Vacation hours used, vacation hours remaining.

My main Employee sheet has their vacation hour allocation for the year. I have a time off able that records vacation hours requested and based on the code, allocates hours.

So basically I need to sum records based on the employees email and subtract from the allocated time.

In short, if John has used 16 hours and gets 80 hours, it would display 16 used and 64 remain,

Thinking I need virtual columns in the employee table but then drawing a blank.

0 18 5,965
18 REPLIES 18

Steve
Platinum 4
Platinum 4

Click through this link:

Thank you @Steve

I am trying to further limit by request type. In this instance, i only want to see how many vacation hours were used. I am guessing my argument needs to be modified a little. Can you help me please

SUM(
SELECT(
Time Off[Hours Used],
AND(
([Name] = [_THISROW].[Name]),
([Date] <= [_THISROW].[Date])

(โ€œVacationโ€) = [THISROW].[Request Type]

)
)
)

What isnโ€™t working? Is there an error? If so, can you share a screenshot of it?

@Steve

Itโ€™s essentially grabbing the same hours vacation time, sick time, and floating.

The formula works but somehow not distinguishing between the 3 time types

@Steve

The app

12 hours used across the board

Vacation = 20
Sick = 8

Please provide a screenshot of the full expression used. Iโ€™d prefer a screenshot to avoid any typos.

@Steve

Made an adjustment. Noticed i had a code issue with () and โ€ฆ This is corrected but now not calculating anything

@Steve

I got to this formula to lookup vacation time remaining. It does capture the number of days used but is capturing everything, not just vacation

Syntax???

2X_7_7b3a63253eb816ca4888c38911824c44868a6d9e.png

Could you please try the following expression

SUM(SELECT( Time Off[Hours Used], AND([Name]=[_THISROW].[Name], TODAY()>=[Date], โ€œVacationโ€=[Request Type])))

Edit: Corrected the spelling of โ€œHours Usedโ€ field in the expression

Thank you!!!

This formula is great for an individual to see their own information. If I were to use this same theory but for the manager to be able to select an employee and see their remaining time, how would I do that

I know the _ThisRow essentially limits the view to the employee in the the app. I took the ThisRow out but I donโ€™t think that is the answer.

Is there any way for the app to know if the current user is a manager?

@Suvrutt_Gurjar has you covered on this one.

Hi, I need help with an expression please. I am building a fleet management app and need to perform a sumif expression. 

I have two tables a trips table and a stats table as seen below. What I am attempting to sum is the distance travelled per month.

As you can see my sheets formula checks the trips table for the distance travelled and the month in which the trip occurred and then checks if the month is the same in the stats table row and does the calculation. 

I need help as I am not sure how to add this formula as an expression in appsheet. The conditions that have to be met for the calculation to work is what is throwing me.

trips-table.png

stats-table-2.png

Please start a new topic for your question.

I have done so.

Top Labels in this Space