Hi all,
I have two tables within my AppSheet. one of them called "Children" and the other one called "TImeSheet". Within the table "TimeSheet" I need to calculate values based on different values from the table "Children". I have in the table *Children" the two columns "Age" and "CareGiverAge". Booth of them are formatted as number.
In the table "TimeSheet" I have a column called "CompleteHours".
I need to calculate within the column "TotalAmountHours" the decimal number based on this formula.
IFS(
(AND(Children[CareGiverAge] < 50, Children[Age] < 1)), [CompleteHours] * 10.5,
(AND(Children[CareGiverAge] < 50, Children[age] >= 1)), [CompleteHours] * 6.85,
(AND(Children[CareGiverAge] >= 50, Children[age] < 1)), [CompleteHours] * 10.85,
(AND(Children[CareGiverAge] >= 50, Children[age] >= 1)), [CompleteHours] * 7.05
)
I get the following error: Cannot compare List with Number in (Children[CareGiverAge] < 50)
How can I resolve the error to calculate the amount.
Thanks for your help.
Solved! Go to Solution.
I assume you need to calculate the value for a specific row in Timesheet table. Then it would be something like..
IFS(
AND(
LOOKUP([_THISROW].[Name],Children,Name,CareGiverAge) < 50,
LOOKUP([_THISROW].[Name],Children,Name,Age) < 1),
[CompleteHours] * 10.5,
And so on..
I assume you need to calculate the value for a specific row in Timesheet table. Then it would be something like..
IFS(
AND(
LOOKUP([_THISROW].[Name],Children,Name,CareGiverAge) < 50,
LOOKUP([_THISROW].[Name],Children,Name,Age) < 1),
[CompleteHours] * 10.5,
And so on..
that was it - thanks!
I still had to adapt it to my column names, but the functionality is correct.
You're welcome!
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |