Hello Experts
I have below columns which takes input value 1, ,2 3, 4, 5, NA
What I'm trying is to have count virtual column of all columns which value is not equal to "NA"
the result should show in virtual column in real time.
Below is the formula which is accepted but its not excluding column(s) in count which has value "NA"
COUNT(
LIST(
IF([Activity-01] <> "NA", 1, ""),
IF([Activity-02] <> "NA", 1, ""),
IF([Activity-03] <> "NA", 1, ""),
IF([Activity-04] <> "NA", 1, ""),
IF([Activity-05] <> "NA", 1, "")
)
)
Please advise what is wrong with this
P.S. I have tried looking into appsheet training guide but I couldn't not find issue or solution
Replace:
1) "" with 0
2) COUNT() with SUM().
Your assumption is that the COUNT is only counting the values of "1" but it actually counts the number of ALL items in the list - "1"'s and blanks.
I hope this helps!!
Hi,
Still couldn't make it work, appriciate if you can write full syntax with my given sample.
What is need it count records which has value 1 to 5, and don't count any cell which is blank or has another value
Hello,
The core issue is that "" (empty string) is still considered a list item in AppSheet, so LIST(1, "", 1) will count that "" as an item, even though it’s not a number. To fix this, you should return NULL instead of an empty string, because NULL values are excluded from lists and will not be counted.
COUNT(
LIST(
IF([Activity-01] <> "NA", 1, NULL),
IF([Activity-02] <> "NA", 1, NULL),
IF([Activity-03] <> "NA", 1, NULL),
IF([Activity-04] <> "NA", 1, NULL),
IF([Activity-05] <> "NA", 1, NULL)
)
)
User | Count |
---|---|
17 | |
16 | |
4 | |
3 | |
2 |