Hi,
I have following simple expression in virtual column of my "Players" table:
SELECT(
Games[_RowNumber],
[_THISROW].[Row ID]=[winning_goal_scorer]
)
This virt. column is set up as type "List"
The expression returns what I'd expect - the list of Ids of games where the player scored winning goal:
But when I try to count the list with following expression:
COUNT(
SELECT(
Games[_RowNumber],
[_THISROW].[Row ID]=[winning_goal_scorer]
)
)
I get the following error:
The expression is valid but its result type 'Number' is not one of the expected types: List
I tried wrapping the "SELECT" in "LIST()" function, I tried splitting the select and count in two separate virt. columns, I tried selecting not _RowNumber but Row ID, but nothing helped, neither did suggestions from almighty AI tools.
I am lost.
What am I too stupid to see? Or is this a bug? It feels unlikely I'd be the only one with such an error, but I really cannot see what I'm doing wrong.
Any help would be greatly appreciated.
Solved! Go to Solution.
Hello, it seems you're experiencing a synchronization issue. You create the list, hit "save," then add the count in the expression, and it shows an error, leading you to assume it's incorrect. Sometimes, AppSheet doesnโt automatically change the virtual column type. Do it manually.
If the result is a number, set the column type to "number."
Another solution I can think of is to create the list of SELECT() in one virtual column and COUNT() the list in another virtual column.
Let me know how it goes.
Hello, it seems you're experiencing a synchronization issue. You create the list, hit "save," then add the count in the expression, and it shows an error, leading you to assume it's incorrect. Sometimes, AppSheet doesnโt automatically change the virtual column type. Do it manually.
If the result is a number, set the column type to "number."
Another solution I can think of is to create the list of SELECT() in one virtual column and COUNT() the list in another virtual column.
Let me know how it goes.
Hi Gustavo,
You were right! Thank you. After manually changing the column type to "number" it works.
It seems like I was focused on the perception that Appsheet thinks list is not a list and meanwhile I should have been focused on number not being a number:)
Kind regards
User | Count |
---|---|
16 | |
7 | |
6 | |
4 | |
3 |