Need help with IN() function

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 Solved
0 5 154
1 ACCEPTED SOLUTION

Sorry. Please try 

SPLIT(TEXT(EXPENSE[ENUMLIST])," , ")

View solution in original post

5 REPLIES 5

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.

Uk
Silver 1
Silver 1
SUM(
  SELECT(
    EXPENSE[TOTAL],
    IN(
      [ENUM],
      SPLIT([_THISROW].[EnumList], ", ")
    )
  )
)
Top Labels in this Space