# Struggling with Count

**URL:** <https://community.glideapps.com/t/struggling-with-count/61484>\
**Category:** Ask for Help\
**Created:** [May 8, 2023, 1:45pm UTC](https://community.glideapps.com/t/struggling-with-count/61484 "2023-05-08T13:45:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![atiwat\_tangchaiwatta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/atiwat_tangchaiwatta/32/22191_2.png) [@atiwat\_tangchaiwatta](https://community.glideapps.com/u/atiwat_tangchaiwatta)\
**Post date:** [May 8, 2023, 1:45pm UTC](https://community.glideapps.com/t/struggling-with-count/61484/1 "2023-05-08T13:45:58Z")

</div>

Hi Community , Now i am working on Glide Page , so far very good but I struggle on Count

1. My new feature
  - Every morning my factory worker routine is planning which machine to produce product ( Now there are 17 machines and about 20 products )

2. Example . this day  
Machine 1 , 4 ,7 - Product A  
Machine 2 . 3 , 6 - Product B
3. I use Multiple step form to make  
3.1 ) Machine status checking ( whether machine is available or under maintenance )  
3.2 ) Then I use choice of 20 products to Machine which are available ( Boolean Condition)  
3.3 ) Final , I set column to my Data Sheet
4. Everything work perfect but now i want to count number of Product / Machine  
Example ) Today , Machine 1 , 2 ,3 making Product C , So count = 3  
4.1) I try to use Countifs in Google Sheet -COUNTIF(X2:AN2,$AO$1)- Which manually working  
4.2 ) I want the formula to auto add when new row added, so i apply Arrayformula  
4.3 ) =ArrayFormula(IF($A2:A=“”,“”,(COUNTIF(X2:AN2,$AO$1)))) Not working , it keeps get the first number  
4.4 ) I try to use excel functions of Glide , but there are only 5 columns that can be applied

 ![as](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/ae8c20e1b82521447e00ce41003a9a045897ca81.jpeg)

 ![ass](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/a/bae6d2237725a6b1a34eb5f96b158b662f023d9a.jpeg)

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [May 8, 2023, 2:04pm UTC](https://community.glideapps.com/t/struggling-with-count/61484/2 "2023-05-08T14:04:57Z")

</div>

I would consider reorganizing your data.

One table for machines and put the machines into rows.

Another table for projects.

When a machine(s) is assigned a project add a new row to your projects table. Then you can use relations and rollups to return counts… sums… etc

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 9, 2023, 12:04am UTC](https://community.glideapps.com/t/struggling-with-count/61484/3 "2023-05-09T00:04:18Z")

</div>

There should be a table of machines, a table of products, and a table of assignments.

The assignments will be a form where you can choose the product using a single choice component, and the machines using a multiple choice component. Then when you submit the form, write the current date to the Assignments table as well.

Then, use a split text column to split the machines columns in the Assignments table, and a rollup to count the total number of machines that are assigned in that row.

> [@atiwat\_tangchaiwatta](#):
>
> Machine status checking ( whether machine is available or under maintenance )

Do you also need to store this data somewhere?

---

<div class="post-metadata">

**Author:** ![atiwat\_tangchaiwatta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/atiwat_tangchaiwatta/32/22191_2.png) [@atiwat\_tangchaiwatta](https://community.glideapps.com/u/atiwat_tangchaiwatta)\
**Post date:** [May 9, 2023, 8:26am UTC](https://community.glideapps.com/t/struggling-with-count/61484/6 "2023-05-09T08:26:31Z")

</div>

It working , Thanks all of you

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 10, 2023, 8:27am UTC](https://community.glideapps.com/t/struggling-with-count/61484/7 "2023-05-10T08:27:20Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
