# Utilising device tag for Expression

**URL:** <https://forums.losant.com/t/utilising-device-tag-for-expression/3142>\
**Category:** Help\
**Tags:** dashboard, tags, device, time-series\
**Created:** [July 24, 2020, 3:01am UTC](https://forums.losant.com/t/utilising-device-tag-for-expression/3142 "2020-07-24T03:01:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@Ben\_Sinclair](https://forums.losant.com/u/Ben_Sinclair)\
**Post date:** [July 24, 2020, 3:01am UTC](https://forums.losant.com/t/utilising-device-tag-for-expression/3142/1 "2020-07-24T03:01:55Z")

</div>

Hi Losant Support,

I’m hoping to understand whether or not is possible to access the value of a device tag for the purposes of using the tag to control the formatting of a time-series.

My specific example relates to the transformation of a distance to a percentage fill without use of a supplementary workflow to create a new attribute through the time-series expression feature:

 ![2020-07-24 14_57_05-Edit Time Series Graph - Losant](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/a8c171fefb56bee66ff8b2d443af75401a394f6b.png)

I’m struggling to access the device tag values associated with the min and max fill points for a container which are stored are associated with the device. In this example, the device is being accessed as a context variable ({{ctx.deviceId-0}})

Is it possible to access tag values for the expression? If so could I please be provided a basic handlebar snippet to assist with using this feature?

Thank you!  
Ben  
PiP IoT

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [July 24, 2020, 11:16am UTC](https://forums.losant.com/t/utilising-device-tag-for-expression/3142/4 "2020-07-24T11:16:31Z")

</div>

@Ben_Sinclair,

Hello 👋

When setting up your device context variable, you have the option to choose “Include full device info in context.” This will add more info about that device to your context variable (like Device Tags).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/8/82564d4e17e24106ef7a57a6aa4c268bfca6a58b.png)

Then, given the tag `min`, from within your expression, you may access the tag like so:

```auto
{{ctx.deviceID.tags.min.[0]}}

```

Relevant Resources:

[Context Variable Documentation](https://docs.losant.com/dashboards/context-variables/#device-ids)  
[Losant University](http://university.losant.com) - Course Four - Context Variables

---

<div class="post-metadata">

**Author:** ![Ben\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@Ben\_Sinclair](https://forums.losant.com/u/Ben_Sinclair)\
**Post date:** [July 26, 2020, 11:49pm UTC](https://forums.losant.com/t/utilising-device-tag-for-expression/3142/5 "2020-07-26T23:49:05Z")

</div>

Hi Taron,

Thanks for your reply - this solved my issue!

Kind regards,  
Ben
