Data Transformation - Gauge Dashboard

I’m trying to use the “Data Transformation”, with expression for transforming my data. I want to print in the Gauge of the Dashboard the subtraction of two attributes of a device, like:

“sysDiskTotal” - “sysDiskUsedAvg” = sysDiskAvailable

“sysDiskAvailable” is the variable that I actualy don’t have and want to calculate. How I supose to do that?

I tried:

{{value}}-{{ctx.childrenId.sysDiskUsedAvg}}

Hi @Kaue_Delazzeri,

I have a couple of clarifying questions that will help us assist you on this issue - I believe you may be running into an issue in which the ctx variable has not been defined properly:

  1. Is the value being used for sysDiskUsedAvg static or dynamic? Meaning is this a defined device attribute that is reported on the payload as part of the device state?

  2. How have you defined the context variable sysDiskUsedAvg in your dashboard? Could you send along a screenshot of your configuration?

Thanks,
@Aidan_Zebertavage

The ctx variable has been defined properly, when I plot/show them (alone) it’s alright:

sysDiskTotal:

sysDiskUsedAvg:

The only question here is: can/how I use two variables in the Expression Data Transformation in the Gauge?

@Kaue_Delazzeri,

Thanks for the additional information. We are working through this on our end. Would you be able to send along a screenshot of your actual ctx variable configuration from your Dashboard Settings?

Thanks,
@Aidan_Zebertavage