Hello. I am trying to do something that seems like it should be very easy but I am struggling with. I have a one to many parent-child relationship of multiple logs in one boom. I created a reference column for boom within my logs table. The two relevant tables are shown below:
There is a column of Related Logs that shows up within the Purchases table as I intended. I now want to count how many of the logs within this Related Logs column have a Processed value of Yes/True. I am struggling with the syntax of accessing this information from the Related Logs column. I thought it would be something like:
count(select([Related Logs], ([Processed] = True)))
But this gives me the error: Cannot compare List with Yes/No in ([Processed] = "True")
This error makes sense to me, so maybe I need to use _THISROW in some way? Maybe I need to change the way I set up my reference? Or add another reference column for Processed?
In summary, I want a way to count the number of logs that are both processed and within a certain boom then display that in the Purchases table. Thanks in advance.
Solved! Go to Solution.
@g_weight wrote:
count(select([Related Logs], ([Processed] = True)))
Try instead:
count(select([Related Logs][_RowNumber], ([Processed] = True)))
COUNT(
FILTER(
"Logs",
AND(
[Boom] = [_THISROW],
[processed]
)
)
)
You cannot user [Related Logs] as the first argument of SELECT because it requires to be of table[col] form.
The error you are getting sounds misleading and not sure why you are getting it....
EDITED: I must have done a test in the wrong way. As @Steve correctly stated, SELECT CAN take a list dereference expression as its first argument! Thanks, @Steve !
@g_weight wrote:
count(select([Related Logs], ([Processed] = True)))
Try instead:
count(select([Related Logs][_RowNumber], ([Processed] = True)))
User | Count |
---|---|
36 | |
31 | |
30 | |
20 | |
17 |