Hi I am having a bit of trouble with a switch formula.
I have a previous Enum column called [CHANNEL].
The choices are: Key Accounts, SME, Others.
The next column is a text field with suggested values based on the selection from [CHANNEL].
What I want is, if [CHANNEL] is "Key Accounts", then return values from table "KA" as suggested values.
But if [CHANEL] is "SME", then return values from table "SME" as suggested values.
else, then return values from table "PCRegGen" as suggested values.
I used a SWITCH() function with the following expression.
SWITCH([CHANNEL],
"Key Accounts", SELECT(KA[MID], [DBA Name]=[_THISROW].[DBA Name], TRUE),
"SME", SELECT(SME[MID], [DBA Name]=[_THISROW].[DBA Name], TRUE),
SELECT(PCRegGen[MID], [DBA Name]=[_THISROW].[DBA Name], TRUE)
)
However, AppSheet is throwing me an error.
I also tried to use Filter instead but same result.
SWITCH([CHANNEL],
"Key Accounts", FILTER("KA", [DBA Name]=[_THISROW].[DBA Name]),
"SME", FILTER("SME", [DBA Name]=[_THISROW].[DBA Name]),
SELECT(PCRegGen[MID], [DBA Name]=[_THISROW].[DBA Name], TRUE)
)
Is there any workaround I can do?
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |