# Calculating percentages based on items in category

**URL:** <https://community.glideapps.com/t/calculating-percentages-based-on-items-in-category/6902>\
**Category:** Ask for Help\
**Created:** [April 12, 2020, 11:12pm UTC](https://community.glideapps.com/t/calculating-percentages-based-on-items-in-category/6902 "2020-04-12T23:12:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 13, 2020, 3:37am UTC](https://community.glideapps.com/t/calculating-percentages-based-on-items-in-category/6902/4 "2020-04-13T03:37:51Z")

</div>

What exactly is the problem you are having? I’m guessing part of it might be the dynamic nature of your lists, but having to set a specific range. To deal with that you would be best off setting the max range of the progress bar to 100 and calculating the percentage of completed tasks.

> [@Dynamic Min/Max for Progress Bar](https://community.glideapps.com/t/dynamic-min-max-for-progress-bar/484):
>
> In addition to setting the Minimum and Maximum within the builder, I’d like to suggest the ability to also set the minimum and maximum using sheet columns. I’m working on a project where I list containers with different capacities and the level that they are filled. For now I can and will calculate a percentage and use 0-100 for the range.

To get your values, I would first create a template column in your tasks sheet of the category and the checkbox value. In the Category sheet, create a template column of the category and the word ‘true’. Then in the category sheet, create a relation to link the category to the category in the task sheet. Create a rollup count using the relation to get the total number of tasks in that category. Next create a second relation using linking the template columns in both sheets. Create a rollup count using this relation to get the total number of tasks that have been completed. Now create a math column that takes the completed task count, divides it by the total task count, then multiplies by 100. This will be the percent complete out of 100.

---

_[View the full topic](https://community.glideapps.com/t/calculating-percentages-based-on-items-in-category/6902)._
