How to write the code in progress circle


i have a database and what i want in this progress circle is to show me the percentage of people who inquired for the appointment Vs who actually came for appointment.. i have all the data attached here


now what i want to do is say show the number of people who called in February month to the people who actually came to appointment in Feb month and i cant figure it out as when i type in the progress circle {{Pre.data.filter(Date_called =>)}} this date_called is giving me error so i cannot write the code after this.
For reference i have first made a tabs then inside that tab i have a collapsed container and then inside that i have table, and this goes for each of Pre, Ongoing and Post so can anyone please help me on this and ASAP as i am currently working on a project.

Hello and welcome,

The progress circle takes in a numeric value from 0 to 100 to represent as percentage.
image

Your code {{Pre.data.filter(Date_called =>)}} I'm assuming filtering an array but that will returns an array type. You need to calculate the percentage of those came to appointment vs those called. So maybe a long the line "count of those came to appointment" / "count of those called" * 100

Thank you for replying but thats not what i am looking for.. i want the data to be of a certain time period..not all the data from the beginning..from beginning is easy to do..i want something like a month of those called vs who came

@lamh_bytecode.io can u please provide me with any of your contact info? email like? i have so many doubts as i am new to the retool platform and i would really like your help if u can

@Sankalp you can DM me on here and I'll get back to you as soon as I can.

As for the issue, if you want to filter to just a particular month the filter() is the correct use.

{{Pre.data.filter(x => moment(x.appointment_date).month() === 1).length ? Pre.data.filter(x => moment(x.date_called).month() === 1).length / Pre.data.filter(x => moment(x.appointment_date).month() === 1).length * 100 : 0}}

@lamh_bytecode.io can I send you my retool share link? It will help you better understand my situation

@Sankalp sure, it will help to understand the scope.

https://sankalp4uin.retool.com/editor/07b58b64-d782-11ed-88cb-2fd830fffa8f/CRM

This is my crm (customer relationship manager) you can see through the things and suggest me updates where they are need to be done.. The database is just garbage.. Just to practice on before I do on a real database.. So if u can please provide your valuable feedback