# Getting number of users and products ordered

**URL:** https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563
**Category:** Ask for Help
**Created:** [January 1, 2022, 3:30pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563 "2022-01-01T15:30:13Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 1, 2022, 3:30pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/1 "2022-01-01T15:30:13Z")

</div>

How to get these values and display it in text.

1.Total number of users logged in  
2.How many product ordered based on the orders with each product  
3.how many products ordered based on the order with category

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [January 1, 2022, 3:36pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/2 "2022-01-01T15:36:01Z")

</div>

It’s all about how you set up your data tables.

I imagine you have at least 4 sheets:

1. Users
2. Products
3. Categories
4. Orders (that include a product ID and category ID of some sort)

Create a multiple relation from the product table to the product ID in the orders sheet, then a Rollup of that relation to get a count of products ordered.

Do the exact same process in the categories table to get the count of products ordered of that category.

As for your first request (number of users logged in) not sure if that’s achievable in Glide (but would be nice to know!)

Not sure if Google Analytics helps here?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 1, 2022, 3:57pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/3 "2022-01-01T15:57:53Z")

</div>

> [@Robert\_Petitto](#):
>
> Not sure if Google Analytics helps here?

It does.

 ![Screen Shot 2022-01-01 at 11.56.56 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/4/74084a0fe3700cf24e5c83c2341efea24bba8e68.png)

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [January 1, 2022, 4:00pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/4 "2022-01-01T16:00:46Z")

</div>

Good to know!

---

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 1, 2022, 4:58pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/5 "2022-01-01T16:58:55Z")

</div>

I want to display it in my app.how to display total number of users?

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [January 1, 2022, 5:49pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/6 "2022-01-01T17:49:02Z")

</div>

Unless you have some sort of integration outside of Glide that regularly updates your spreadsheet with Google Analytics numbers, I don’t think there’s a way to do this. I know that google sheets does have A Google Analytics add-on that could possibly update your spreadsheet regularly with current numbers, but it wouldn’t be a live sync…it would be an update on an interval.

> **[Google Analytics Spreadsheet Add-on  |  Analytics Implementation...](https://developers.google.com/analytics/solutions/google-analytics-spreadsheet-add-on)**

---

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 1, 2022, 5:49pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/7 "2022-01-01T17:49:43Z")

</div>

I will try it.

---

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 3, 2022, 10:01am UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/8 "2022-01-03T10:01:51Z")

</div>

Hi

Now what I did,

Created a relation column  
Rollup that relation column getting the count values  
in orders table.

Then in category table,I created lookup column to get values from orders table,and created rollup column ,it’s summed up correctly but it’s display same value for all the categories.

Values to be different based on how many times it’s been ordered in order table.

---

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 3, 2022, 2:50pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/9 "2022-01-03T14:50:29Z")

</div>

Hi

I don’t have any id in product table as well as category table.i only having row id.

I change my mind n just need only categorytype wise bought orders need to be count and display in inline list like,

100 orders bought

I have 4 category type

For example,

A B C D

5 times 3 times 2 times. 5 times

---

<div class="post-metadata">

### Author: ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)
#### Post date: [January 3, 2022, 6:25pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/10 "2022-01-03T18:25:30Z")

</div>

Problem solved .

---

<div class="post-metadata">

### Author: ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)
#### Post date: [January 3, 2022, 7:23pm UTC](https://community.glideapps.com/t/getting-number-of-users-and-products-ordered/36563/11 "2022-01-03T19:23:00Z")

</div>

In my app, I have a control table with 1 record where I store all kinds of common stuff for the app. Then I have a relation between that table and the users table so I can “lookup” stuff and have the data available as computed columns. I just added a ‘rollup’ to the control table from the users table and it gave me the count. As you can see, this app is just getting started – all I have are beta users at the moment…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cd0ca1a9d381571e5cd18b860e6f14bd6a86ca39.png)
