Calculating percentages based on items in category

So I’m trying to make a task app that contains tasks and categories for those tasks.

I want to be able to use the progress bar component in my app to show how many apps in a certain category are completed, but for some reason I’m confused on how to go about this.

I’ve created a relation to sort which tasks are in which category, and I have a true/false column in my sheet that shows if the task is completed. I’m just a bit confused as to how to pull all of this together to use the component I want.

Sorry if this is such a basic question, but thanks for reading and taking the time to help me :slight_smile:

While you are waiting for one of the experts to answer your query, you might find the following useful.

https://docs.glideapps.com/all/reference/components/charts/progress-bar

I’ve added a progress bar that auto-populates itself on completion of each task to a Glide app. It’s quite easy. Just use the Data editor to do it.

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.

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.

Thanks so much for taking the time to type out your response! I’m sure it’s me and not you, but I wasn’t able to follow along with the steps outlined here.

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

Okay, I believe I did this correctly, this is what it looks like:


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.

This is where you lose me, I’m sorry.
xtqig.glideapp.io

I’m assuming you are referring to this, which looks like you already solved your problem?

Yessir! thanks for the walk through!

1 Like