# How to display several form entries in graph comp

**URL:** <https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468>\
**Category:** Ask for Help\
**Created:** [March 10, 2022, 1:04pm UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468 "2022-03-10T13:04:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [March 10, 2022, 1:04pm UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/1 "2022-03-10T13:04:08Z")

</div>

Hey guys,

I want to display users´ asset allocation by the graph component. Something like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/1/01678cf482e9a7557acb7a991505111fa8f3685d.png)

Our app will collect the data in ONE view, see screenshot. data is stored in user table. one column for each asset class.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/a/0a8e9acf0772dfb3455dbc6cc73cbc523d4faa45.png)

How can I structure these data per row in order to enable the graph components? With relations, lookups…?

---

<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:** [March 11, 2022, 12:09am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/2 "2022-03-11T00:09:40Z")

</div>

So you’re having the two pieces of data on the same row and want to use them to create a donut chart?

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [March 11, 2022, 12:27am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/3 "2022-03-11T00:27:59Z")

</div>

check this:

A good explanation about this method from @Robert_Petitto here:

> [@fishbaguette\_breadbasket Transpose Columns to an Inline List: The Miracle Method](https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766):
>
> I’m often asked how to take columns of data (say form responses) and display them in an inline list. Here’s one way to do it—the MIRACLE METHOD. [[Glide: Transpose Data Columns into an Inline List with the MIRACLE METHOD] ](https://www.youtube.com/watch?v=t-sh_Q3WbQc)

---

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [March 15, 2022, 10:51am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/4 "2022-03-15T10:51:22Z")

</div>

@Roldy You´re the best. Thank you so much for this video! 🙏  
Implementation works very well now. 👍

One last question:  
How to handle empty data columns? I mentioned that the order for the chart only works if there is a 0 value in the empty field. But how can I add this by default?

Data with empty column for ETF

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/8/b83b96ffa1f3a6376863a858e3f98c5be1d32ae8.png)

Data with empty column for ETF, 0 value added manually in backend

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

---

<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:** [March 15, 2022, 11:02am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/5 "2022-03-15T11:02:27Z")

</div>

Use an if-then-else column:

- If value is empty, then 0
- Else value

And then use that if-then-else column in place of the original column.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [March 15, 2022, 11:23am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/6 "2022-03-15T11:23:48Z")

</div>

Happy to help you.  
The method for replacing an empty field with zero is what @Darren_Murphy told you. I’m sorry I wasn’t more specific before!

---

<div class="post-metadata">

**Author:** ![Martina\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/martina_g/32/22597_2.png) [@Martina\_G](https://community.glideapps.com/u/Martina_G)\
**Post date:** [March 15, 2022, 11:35am UTC](https://community.glideapps.com/t/how-to-display-several-form-entries-in-graph-comp/39468/7 "2022-03-15T11:35:36Z")

</div>

Thank you guys. I´m super happy with the result.
