Canvas - Any way to consolidate 2 metric elements into one markdown element?

I have an elastic sql query that returns 2 calculated ("last") columns. I have use 2 "metric" elements on a canvas dashboard to display the sum of each column, respectively (selecting "sum" of the column name in both elements under "Display -> Measure -> Number").

What I would really like to do is somehow incorporate both of these values in a "markdown" element that would contain both values, plus some text. After a lot of time spent playing in the expression editor and trying to understand the capability of this notation/syntax, I still can't figure out if this is possible.

All I have figured out so far is that with a markdown element, I can put the same query in under "Data" and put this under Display -> Markdown -> Markdown content

    {{#each rows}}
     **{{column1}}** and **{{column2}}** 

But in that scenario, only one row from the query result is used in reflecting the values of column1 and column2.

EDIT: I've also asked a much more specific question about this here: Can a Kibana Canvas Markdown Element Display a Total of a Column?

Hi @devbot

Can you share the expression as you've got it now and I would be glad to help you try to debug where the problem might be.

Yes. I put the entire expression syntax for the markdown element in this question, where I've basically asked the same thing but in a different way: Can a Kibana Canvas Markdown Element Display a Total of a Column?

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