# Help with making a section in the app

**URL:** https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108
**Category:** Ask for Help
**Created:** [April 4, 2023, 2:49am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108 "2023-04-04T02:49:15Z")
**Posts on this page:** 20
**Page:** 2

<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: [April 4, 2023, 5:13am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/21 "2023-04-04T05:13:20Z")

</div>

How many days do you want to see at a time? One week? One month? The entire sheet?

What if you could select a month like “January” and see all the totals for the days in January. Would that work?

---

<div class="post-metadata">

### Author: ![Jenish\_Shrestha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jenish_shrestha/32/53036_2.png) [@Jenish\_Shrestha](https://community.glideapps.com/u/Jenish_Shrestha)
#### Post date: [April 4, 2023, 5:29am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/22 "2023-04-04T05:29:10Z")

</div>

No that wont do it. I need the total for each day.

---

<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: [April 4, 2023, 5:33am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/23 "2023-04-04T05:33:21Z")

</div>

Yes I understand. The total would be by each day. How many days do you need to see on screen at one time?

Would it work if you select January and see all the days in January or select February and see all the days in February?

---

<div class="post-metadata">

### Author: ![Jenish\_Shrestha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jenish_shrestha/32/53036_2.png) [@Jenish\_Shrestha](https://community.glideapps.com/u/Jenish_Shrestha)
#### Post date: [April 4, 2023, 5:35am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/24 "2023-04-04T05:35:54Z")

</div>

Yeah that won’t be a problem.

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [April 4, 2023, 5:44am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/25 "2023-04-04T05:44:50Z")

</div>

Done:

 ![Screen Shot 2023-04-04 at 1.43.51 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/d/ed5e332fea74f5ff00b5805eed1be55fa54edb48.jpeg)

> **[Sum daily sales](https://sum-daily-sales.glide.page)**

---

<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: [April 4, 2023, 5:48am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/26 "2023-04-04T05:48:34Z")

</div>

👑

---

<div class="post-metadata">

### Author: ![Jenish\_Shrestha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jenish_shrestha/32/53036_2.png) [@Jenish\_Shrestha](https://community.glideapps.com/u/Jenish_Shrestha)
#### Post date: [April 4, 2023, 5:51am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/27 "2023-04-04T05:51:18Z")

</div>

Wow this is kind of it

---

<div class="post-metadata">

### Author: ![Jenish\_Shrestha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jenish_shrestha/32/53036_2.png) [@Jenish\_Shrestha](https://community.glideapps.com/u/Jenish_Shrestha)
#### Post date: [April 4, 2023, 5:54am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/28 "2023-04-04T05:54:34Z")

</div>

How do I do it ?

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [April 4, 2023, 6:08am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/29 "2023-04-04T06:08:42Z")

</div>

You have to generate a JSON file from the data and use JavaScript to sum the same dates.

---

<div class="post-metadata">

### Author: ![Jenish\_Shrestha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jenish_shrestha/32/53036_2.png) [@Jenish\_Shrestha](https://community.glideapps.com/u/Jenish_Shrestha)
#### Post date: [April 4, 2023, 6:17am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/30 "2023-04-04T06:17:21Z")

</div>

could you provide me a copy of your work ?

---

<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: [April 5, 2023, 12:09am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/31 "2023-04-05T00:09:19Z")

</div>

I still kind of don’t understand the ultimate desired outcome here. Is it basically just a sum of each day’s sales?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [April 5, 2023, 12:14am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/32 "2023-04-05T00:14:18Z")

</div>

This looks to me like it should simply be a trunc(date) in a math column, a template to join the date with the user, then a relation linking the template to itself. Follow that with a rollup to sum the total for each user per day.

Possibly combined with the logic to only show the sum in unique rows and a filter the list to those unique rows.

Haven’t really studied the problem here, but seems easily doable without getting into javascript.

---

<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: [April 5, 2023, 12:54am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/33 "2023-04-05T00:54:55Z")

</div>

That’s how I understood it… just a sum of each days sales. I was thinking along the lines of what @Jeff_Hager just suggested and additionally add a choice component to filter the relation by month.

---

<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: [April 5, 2023, 12:55am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/34 "2023-04-05T00:55:48Z")

</div>

Yeah, I don’t understand why there needs to be a more complex solution than a relation + rollup here.

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [April 5, 2023, 1:02am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/35 "2023-04-05T01:02:15Z")

</div>

I would love to se the easy sololution to reproduce my App JavaScript, i think you gonna have to craete a spider web of relations, rollups and if else columns 😉

---

<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: [April 5, 2023, 1:10am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/36 "2023-04-05T01:10:20Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/6/16d5c27f0123f84bac1d405d297c858cd33f41f4.png)

Isn’t this the same result?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/e/ded6e4d3ee85b109d4d0417880cde08e976699b1.jpeg)

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [April 5, 2023, 1:28am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/37 "2023-04-05T01:28:15Z")

</div>

That is a perfect solution @ThinhDinh. I forgot that you could sum relations! And it has 1 column less than mine, LOL… Good Job!  
But I still prefer JavaScript and transforming data to JSON. It will give more options for advanced calculations and filtering, It is just way easier to deal with JSON.

 ![Screen Shot 2023-04-04 at 10.52.16 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/24678fe1f6133d3194dfb2e3b8e6213a87c98607.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: [April 5, 2023, 2:42am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/38 "2023-04-05T02:42:27Z")

</div>

19 Columns but I included a choice, running total and a list collection 😉

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [April 5, 2023, 2:57am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/39 "2023-04-05T02:57:09Z")

</div>

19 columns… LOL. You have a lot of time to spare 😉

---

<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: [April 5, 2023, 3:11am UTC](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108/40 "2023-04-05T03:11:40Z")

</div>

Trying to earn my keep amongst legends… 🤓

The majority of the bulk is in the running total. In the past I’ve tried JavaScript for a running total but there were some edge cases where it broke.

I do think JavaScript is a very valuable tool and I need to learn more. Will you teach me some of your ways @Uzo?

[Previous page](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108.md?page=1)

[Next page](https://community.glideapps.com/t/help-with-making-a-section-in-the-app/60108.md?page=3)
