I'm trying to sum the values returned from a Query JSON with SQL query, but getting only zero as the result. Here's my code: select sum(availableRenewal) from {{query_AllOpptys.data.map(i => parseInt(i.availableRenewal))}}
In the watcher I can see that the JSON object is populated with the right data in the right type (ints not strings). Any ideas? Thanks.
Hi Justin,
How to get a sum of column values to show in the statistics component. I have a table column name "Inc Fee" in which string values like "$1500". I need to show the sum of all of that column. Please help me get out of it.
I am importing data from google sheets. If I remove $ sign and get data in numbers then how to sum all the fields of a column? Any casting require from string to number or maping to sum all column values?
@SalmanMaqbool could you share more details on what the column looks like / a screenshot? If you're using Query JSON with SQL then a simple SUM(column_name should do it.
. I have data from google sheet not from json or SQL query. Its simple google sheet data with some columns having number and I want to get sum of a specific column. Look I have tried {{_.sum(table1.data['7'])}}. But is saying that is requires string and you are providing numbers. ['7'] presents the column "Expected views".