Add total row in Canvas Datatable

Hi everyone,

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.

I'll appreciate any suggestion.
Thanks,
Chiara

Maybe you could use an expression language to tackle this one? Here's a response with a similar question: How to create a new line on a kibana canvas table - #4 by wylie

Hi @Marta_Bondyra ,

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 ?

Thanks,
Chiara

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.