Calculation of Values
Hi,
I have a sample data of users as below:
{
"id": 10040,
"status": "Active",
"username": "Tester1
},
{
"id": 10042,
"status": "Inactive",
"username": "Tester2
},
with this data, I have integrated Google Chart to show the total of active and inactive users. However, the options for calculating “status” was only count and distinct count. May I know how can I calculate the percentage or number of users with active/inactive and pass it to the google pie/bar chart?
Thank you.
2 answers
Hi Elisa!
Thank you for your question.
We’ve prepared a demo for you which shows how to create a dashboard with Google Charts and Pivot Table. Hope it will help understand which slice you need to define and how to pass it to charts.
Please note that to be able to apply sum
, average
and other aggregations for numerical fields, the field should have the number
data type. You can make the component interpret the field the way you need by setting data types explicitly. Please refer to our guides:
Hope this is helpful for your case.
Best regards,
WebDataRocks Team
Thanks for the answer!