# Dashboarding non device data

**URL:** <https://forums.losant.com/t/dashboarding-non-device-data/1243>\
**Category:** Feature Request\
**Tags:** device\
**Created:** [November 15, 2018, 12:47pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243 "2018-11-15T12:47:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Penney](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Christopher\_Penney](https://forums.losant.com/u/Christopher_Penney)\
**Post date:** [November 15, 2018, 12:47pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/1 "2018-11-15T12:47:24Z")

</div>

Is there a way to dashboard non device data i.e data tables, 3rd party dbs, api services, etc?  
Would like to try to do some simple business kpi displays similar to geckoboard or powerbi.

That would be a big sell, particularly if it means your customers could avoid having to pay for a separate service for the BI visualizations.

Either way, adding data tables as a dashboard source would be very useful

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [November 15, 2018, 2:50pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/2 "2018-11-15T14:50:27Z")

</div>

You actually can already do this! The [Custom Chart](https://docs.losant.com/dashboards/custom-chart/) block allows you to query and graph [data table data](https://docs.losant.com/dashboards/custom-chart/#data-table-queries), and in addition, you can reference external data source URIs in the chart JSON configuration as well.

---

<div class="post-metadata">

**Author:** ![Christopher\_Penney](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Christopher\_Penney](https://forums.losant.com/u/Christopher_Penney)\
**Post date:** [November 15, 2018, 8:21pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/3 "2018-11-15T20:21:07Z")

</div>

@Michael_Kuehl nearly every request i have is already there i just didnt look hard enough. ha. thanks!

---

<div class="post-metadata">

**Author:** ![Eckehard\_Fiedler](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@Eckehard\_Fiedler](https://forums.losant.com/u/Eckehard_Fiedler)\
**Post date:** [March 20, 2019, 8:36pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/4 "2019-03-20T20:36:41Z")

</div>

Is there any way to debug the requested data in a custom dashboard? Currently we are ending up with a blank page if - whatever - is going wrong.

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [March 20, 2019, 9:43pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/5 "2019-03-20T21:43:33Z")

</div>

Hello!

I would recommend performing the same query as in the dashboard, but within in a workflow. You will be able look at the payload to see how the data is coming through.

Hopefully this helps,  
Julia

---

<div class="post-metadata">

**Author:** ![Eckehard\_Fiedler](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@Eckehard\_Fiedler](https://forums.losant.com/u/Eckehard_Fiedler)\
**Post date:** [March 21, 2019, 9:23am UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/6 "2019-03-21T09:23:46Z")

</div>

Hy Julia,

a)  
How to get a value from a data source in and out of a workflow

b)  
How to bring the value to Vega

is there any example how to do this? Many thanks for some advice.

Best regards, Eckehard

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [March 21, 2019, 9:14pm UTC](https://forums.losant.com/t/dashboarding-non-device-data/1243/7 "2019-03-21T21:14:13Z")

</div>

Hello @Eckehard_Fiedler,

Here are some walkthroughs and examples, let me know if they are unclear in any way!

**Replicating Custom Chart Block Data in a Workflow**

For your first question, I use the equivalent workflow node for the query I am performing. For example, if I have a Custom Chart block with a Time Series query, like so:

 ![56%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/5/54e9ceb2526a95b71ae0eef49ff2466c51475d1b.png)

I can replicate how the data will be output by using the Data: Time Series node. I set the values and parameters to be the same as my custom chart block, and am able to see on the payload how my data will be shown.

 ![58%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/61dd80c5aabf0185d4a438fc8f27ad52b1ec18a1.png)

Upon inspecting my page, you can see that the data from the payload is in the same format:  
 ![12%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/b/b77b15b60d1a54f524b38b24b257ee39163afc09.png)

Your second question has two possible paths. The first route is available if you are trying to show one value. The Vega Lite block is only able to display one query value in its current state. You will also not be able to reference multiple device attribute values, as the configuration syntax will only allow for one “name” value. Likewise, the data available for your selected attribute is limited to `time` and `value`, the name of the attribute is unaccessible.

The other option you have is to take the Experience route. Here is a great workflow by @anaptfox for working around the single query limit:

**Plotting Custom Chart Data with Experience Endpoints**

Start by creating a new [Experience Endpoint](https://docs.losant.com/experiences/endpoints/) with a Get method:

 ![59%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/b/bad965305151df198b5076999b419d4e9f8cfe2b.png)  
 ![34%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/485f8349b2181b21b17fa9313de539065fe95433.png)

Next, create an [Experience Workflow](https://docs.losant.com/workflows/experience-workflows/) for your Endpoint. When the Endpoint is triggered, this workflow grabs three of my devices with the [Device: Get Node](https://docs.losant.com/workflows/data/get-device/) and puts them on the payload. I have “Include the most recent composite state reported” checked on all of these, so that I can easily grab the last value and the time it was reported. This makes it easier to find those “last reported state” values you are looking for.

 ![34%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/7/7aeb0f3ffaf66e933c87b668b229d85d397f10d8.png)

Here you can see what the Device: Get Node puts on the payload:

 ![01%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/a620dff502ef7f573487ce743b43215b3fada338.png)

Next is a [Loop Node](https://docs.losant.com/workflows/logic/loop/) containing a [Mutate Node](https://docs.losant.com/workflows/logic/mutate/) and an [Array Node](https://docs.losant.com/workflows/logic/array/). The Mutate Node moves the values we want from compositeState to the `current` object and the Array Node creates an array with these values.

 ![57%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/052464f355c8c0d99b7ff96e4844e97d565b99df.png)  
 ![24%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/c/c6bed3148901156f1bf3a3fed17148764e28984c.png)

We conclude the workflow with the Endpoint Reply, and set the response body to the `result.data` payload path.

 ![45%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/f/f84375492a6ff8fe587c5d782f4eb338c9f23d36.png)

Now, we can move right along to our Custom Chart block. 🥳

 ![36%20PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/00726cff4debc84146bcb398c3647ee878d64314.png)  
This Custom Chart takes no queries, as the data will be accessed via the Endpoint. The code for Vega Lite is as follows:

```auto
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "data": {"url": "https://YOUR-APPLICATION-ID.onlosant.com/data?t={{block.time}}"},
  "width": {{block.width}},
  "height": {{block.height}},
  "autosize": {
    "type": "fit",
    "contains": "padding"
  },
  "encoding": {
    "y": {
      "field": "name",
      "type": "nominal"
    },
    "x": {
      "field": "temperature",
      "type": "quantitative"
    },
    "color": {
      "field": "name",
      "type": "nominal",
      "scale": {
        "range": [
          "#EA98D2",
          "#659CCA",
          "red"
        ]
      }
    }
  },
  "layer": [
    {
      "mark": "bar"
    },
    {
      "mark": {
        "type": "text",
        "align": "left",
        "baseline": "middle",
        "dx": 3
      },
      "encoding": {
        "text": {
          "field": "temperature",
          "type": "quantitative"
        }
      }
    }
  ]
}

```

This code calls the data with the Endpoint URL, and the `{{block.time}}` value allows for the value to b updated each time the dashboard is.

Let me know if you have any questions!  
Julia
