# Using variables within rows to build graphs

**URL:** <https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609>\
**Category:** Ask for Help\
**Created:** [July 4, 2024, 5:46am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609 "2024-07-04T05:46:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![McKinnon](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@McKinnon](https://community.glideapps.com/u/McKinnon)\
**Post date:** [July 4, 2024, 5:46am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/1 "2024-07-04T05:46:48Z")

</div>

Hi Community,

Im building a Training Plan Creator for our Basketball Club, and within each Training plan, coaches have the ability to select drills from a drill database.

Each “Drill” has 10 different variables called “Focus Areas”

Basically, what i want to do is have a screen with a pie chart showing the percentages of each Drill variable so coaches know how much they are working on each thing across the season.

Any help would be much appreciated!

 ![Screenshot 2024-07-04 at 3.44.50 pm](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/1/81605c5a614a16e6f8bba3803b5a6462d5fe0478.png)  
 ![Screenshot 2024-07-04 at 3.45.55 pm](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/5/d5ccdd0ad3e0c0d4cba9a43925cac713cccf43a8.png)  
 ![Screenshot 2024-07-04 at 3.46.12 pm](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/137163831c1567c3b40b9850637319f0d8e99b07.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:** [July 4, 2024, 12:47pm UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/2 "2024-07-04T12:47:19Z")

</div>

How are they selecting drills? So, In other words, if basketball selects layup lines and form shooting, you’d want a pie chart that shows 50% footwork, 25% shooting and 25% finishing?

---

<div class="post-metadata">

**Author:** ![McKinnon](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@McKinnon](https://community.glideapps.com/u/McKinnon)\
**Post date:** [July 5, 2024, 12:16am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/3 "2024-07-05T00:16:40Z")

</div>

Hey Robert,

Yes exactly right.

They select drills from the “Drill Library” using drop downs in a Form which populates the “Training Plan” Table (The 2nd screenshot).

---

<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:** [July 5, 2024, 12:39am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/4 "2024-07-05T00:39:04Z")

</div>

![Screenshot 2024-07-04 at 3.45.55 pm](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/5/d5ccdd0ad3e0c0d4cba9a43925cac713cccf43a8.png)

So you mean this table, and the related columns are 0-5 mins, 6-15 mins and so on?

---

<div class="post-metadata">

**Author:** ![McKinnon](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@McKinnon](https://community.glideapps.com/u/McKinnon)\
**Post date:** [July 5, 2024, 1:02am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/5 "2024-07-05T01:02:21Z")

</div>

Yes correct!

---

<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:** [July 5, 2024, 1:11am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/6 "2024-07-05T01:11:02Z")

</div>

I don’t have a straightforward way to do this. What I would do, assuming each drill chosen is unique:

- Create an array of the drills from those 0-5 mins, 6-15 mins, etc. column.
- Create a multiple relation from that array to the Drill Library.
- Create a joined list column of the focus area.
- Craft something with Quickcharts/Chart.js to display a custom chart.

---

<div class="post-metadata">

**Author:** ![McKinnon](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@McKinnon](https://community.glideapps.com/u/McKinnon)\
**Post date:** [July 5, 2024, 6:56am UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/7 "2024-07-05T06:56:48Z")

</div>

Hey ThinhDinh,

The drills arent unique, they are from a table of drills called “Drill Library” which have the “Focus Area” in their row.

---

<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:** [July 5, 2024, 1:12pm UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/8 "2024-07-05T13:12:39Z")

</div>

So you mean in a session, you can do drill A, drill B and come back to drill A later, and it takes the value from the “Drill Name” in your Drill Library?

---

<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:** [July 5, 2024, 1:17pm UTC](https://community.glideapps.com/t/using-variables-within-rows-to-build-graphs/74609/9 "2024-07-05T13:17:47Z")

</div>

Here’s one way to approach it:  
https://www.loom.com/embed/f2480820a4704dacb175182b11de7e5b
