I have a dynamically generated list column on each record in a table. It consists of decimal values. I need to count all the non-zero elements in the list. The problem is that if I subtract a list of zero (-list(0)), it has the side effect of eliminating any duplicate values in the list as well (it effectively makes the list only contain unique values), which is not desirable because then those duplicate elements don't get counted. I cannot use filter() or select() to achieve this because the list is comprised of columns from within each row. Help?
Solved! Go to Solution.
Could you share how you are constructing the list?
is it as follows, since you mentioned you are creating it from the same record?
LIST([Column 1] , [Column 2]........., [Column n-1], [Column n])
Also could you mention what you mean by dynamically created list?
Thank you.
It is not very elegant but I would try in another VC, an expression something like below which would give me the count of non zero columns in the list.
IF([Column 1]>0 , 1, 0)+
IF([Column 2]>0 , 1, 0)+
........+
IF([Column n-1]>0 , 1, 0)+
IF([Column n ]>0 , 1, 0)
User | Count |
---|---|
15 | |
10 | |
7 | |
3 | |
2 |