Dear Appsheet community,
This is my situation. I have a tabled call EXPENSE with 3 columns ( [ID], [ENUMLIST], [TOTAL]) [ENUMLIST] has a possible values of {"a", "b", "c"}).
I have another table called SUMMARY with 3 rows and 2 columns. The first column in each row is "a", "b", and "c".
What I want to achieve is to SUM the total of EXPENSE where the value of the first column exist in the [ENUMLIST] of the EXPENSE table.
So I put this formula in a computed column of the SUMMARY table.
SUM(SELECT([TOTAL], IN([_THISROW].[FIRST COLUMN], EXPENSE[ENUMLIST]) , FALSE))
This doesn't work. I'm not sure where this goes wrong. Am I interpreting the formula incorrectly?
Thank you for your help. Hope my explanation of the problem is clear.
Solved! Go to Solution.
Have not looked into other part of your requirement.
However, in place of EXPENSE[ENUMLIST] , please try SPLIT(EXPENSE[ENUMLIST],",")
Thank you for your response. This unfortunately didn't work.
Sorry. Please try
SPLIT(TEXT(EXPENSE[ENUMLIST])," , ")
Thank you. This works wonder.
SUM(
SELECT(
EXPENSE[TOTAL],
IN(
[ENUM],
SPLIT([_THISROW].[EnumList], ", ")
)
)
)
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |