Count same items in db

I am trying to count how many times I have the same item in a column in my db and display it in a card.
In this case I want to count how many I have of Type “A350” but I cant get it to work.
I tried different formulars like this one:

image

Hi, the correct formula would be:

COUNT(SELECT(data.NameDB1, item.Type === "A350")))

Inside the SELECT formula you refer to the object as item, check out the documentation for examples.

The number is still not counted (or displayed).
I was unsure about the item-part because when writing “item” there is no autosuggestion like when you start writing “data.Na…”
The three === I guess is because it is strict equal like javascript

I tried your suggestion but my card is still not showing anything.

image

image

Hi, based on the yellow warning you are getting it looks like your data variable might not be a list of objects? Here I’m doing the same with a list:

image

Oh I found the problem… NameDB1 was a data variable for making a new record. it did not contain the data in my db and was not a list.
I made a new data variable NameDB2 and then the formular works :slight_smile:
Thanks

1 Like