# How to represent output of complex query in dashboard

**URL:** <https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453>\
**Category:** Elasticsearch\
**Created:** [July 9, 2019, 5:12am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453 "2019-07-09T05:12:36Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 9, 2019, 5:12am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/1 "2019-07-09T05:12:36Z")

</div>

I have complex query in kibana. How to represent that output in dashboard?  
I am writing the query in kibana console How to represent that in the visulize form  
see the below question for further explanation.

> [@Dashboard for 3 level of aggregation in kibana](https://discuss.elastic.co/t/dashboard-for-3-level-of-aggregation-in-kibana/191186):
>
> I have a document type doc1 { event\_timestamp: event\_type: store\_id: } GET /internship40/\_search { "query": { "bool": { "must": [{ "match" : { "attributes.store\_id" : "41b15888-0c2f-48f9-89d0-dc7aad19f52b" } }, { "match": { "event\_type":"app\_sent\_heartbeat" } }] } }, "aggs": { "my\_date\_histo":{ "date\_histogra…

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 9, 2019, 5:42am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/2 "2019-07-09T05:42:11Z")

</div>

It is virtually impossible for someone to answer this unless you provide a lot more detail...

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 9, 2019, 5:47am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/3 "2019-07-09T05:47:59Z")

</div>

do you use kibana console?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 9, 2019, 5:52am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/4 "2019-07-09T05:52:53Z")

</div>

I do not understand exactly what you are doing or trying to achieve. Please provide more information.

---

<div class="post-metadata">

**Author:** ![Juanma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanma/32/49076_2.png) [@Juanma](https://discuss.elastic.co/u/Juanma)\
**Post date:** [July 9, 2019, 6:24am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/5 "2019-07-09T06:24:15Z")

</div>

Hello @A_google_user

Without more information is hard to help you.

But if for a kibana complex query (with [dev tools](https://www.elastic.co/guide/en/kibana/current/devtools-kibana.html) in [query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html)) you mean subagregations or agregations not shipped in kibana visualizations you should use Vega visualizations it allows you to code the visualization taking a query as input [https://www.elastic.co/blog/getting-started-with-vega-visualizations-in-kibana](https://www.elastic.co/blog/getting-started-with-vega-visualizations-in-kibana).

Documentation: [https://www.elastic.co/guide/en/kibana/current/vega-graph.html](https://www.elastic.co/guide/en/kibana/current/vega-graph.html)

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 17, 2019, 6:02pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/6 "2019-07-17T18:02:34Z")

</div>

Let's say We run a query in dev tool How to visually represent that query output in graph ?

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 18, 2019, 4:54pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/7 "2019-07-18T16:54:55Z")

</div>

@Christian_Dahlqvist Have you used dev tool ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 18, 2019, 5:34pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/8 "2019-07-18T17:34:10Z")

</div>

You can't.

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 19, 2019, 8:14pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/9 "2019-07-19T20:14:21Z")

</div>

Did you understand my issue?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 19, 2019, 8:37pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/10 "2019-07-19T20:37:13Z")

</div>

I understood that you want to visualize the output of a query you are running in dev tools.

If not, feel free to be more specific.

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 20, 2019, 5:54am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/11 "2019-07-20T05:54:52Z")

</div>

Yeah,You are right.That is my problem.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 20, 2019, 9:12am UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/12 "2019-07-20T09:12:17Z")

</div>

What is the use case?

---

<div class="post-metadata">

**Author:** ![A\_google\_user](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_google_user/32/46709_2.png) [@A\_google\_user](https://discuss.elastic.co/u/A_google_user)\
**Post date:** [July 24, 2019, 6:47pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/13 "2019-07-24T18:47:55Z")

</div>

So I have attached my document type in question. The data comes from app. Stores use this app. A store is considered online for an hour if one or more heartbeat type event comes in an hour. So I want to find out percentage of hours device was online for custom range of dates.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 21, 2019, 6:57pm UTC](https://discuss.elastic.co/t/how-to-represent-output-of-complex-query-in-dashboard/189453/14 "2019-08-21T18:57:08Z")

</div>

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