I have a question: I need to add a line with totals on my Canvas datatable.
It's possibile ?
I created in Canvas a table with ES SQL Query and I cannot import Table object from Kibana, because in Canvas I have the possibility to create calculated column and add graphic customization... but I don't know how to add in my table a row with the columns totals.
thanks for your reply. I read the post you attached, but I have another question.
My code is something similar like this:
var_set name="total" name="results"
value={essql "SELECT count(*) as Total FROM \"index-patter-name*\" where ReportDate > dateadd('MM',-1,curdate()) and ReportDate < dateadd('DD',-2,curdate()) "}
value={essql "select top 10 FieldA as Venue,
count(*) as Volumi2
from \"index-pattern-name*\"
where
ReportDate >= dateadd('MM',-1,curdate()) and ReportDate <= dateadd('DD',-2,curdate()) and FieldA is not null
group by FieldA
Order by Volumi2 desc "}
| var name="results"
| var_set name="sum" value={ply expression={math "sum(Volumi2)"} | getCell "value"}
| var name="results"
| mapColumn name="Volumi" fn={getCell "Volumi2" | formatnumber "0,0"}
| staticColumn name="sum" value={var name="sum"}
| mapColumn name="Volumi percentuali" expression={math "Volumi2/sum" | formatnumber "0.00%"}
| sort by="Volumi2" reverse=true
| columns exclude="sum,Volumi2"
| table paginate=false perPage=10
Reading the post, I don't understand how to add row 'Total' in the column Venue ?
I must create an if condition or something similar for the column Venue ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.