I want to dynamically update a number variable based on a single number analysis. My ultimate goal is to use this number variable with a gauge widget so that I can also make use of the color changing properties (from a variable) the gauge widget has.
Hi Richard! Welcome to Tulip Community!!
I don’t believe you can use the number from a single number analysis directly, but what are you using to make that analysis? I ask because if it is it a variable that we can access in the app, then we could definitely use that for your gauge widget.
Are you using one of the gauge widgets from our library? https://tulip.co/library-search/?desc=gauge
Let me know how we can help more!
The analysis calculates an average over 30 days for a specific column in a table.
The column is populated from a variable each time the app runs.
Is there a way I can do the same calculation the analysis does using a trigger so I can store the calculated value into a new variable?
I plan to use the custom radar chart widget.
Hi Richard
I confirmed with out Product Team that we cannot currently use the result of a single number analytic as a variable, but they are working on it (after we get Analytics versioning, which is required first to make this a reality).
In the meantime, as another way to approach this, you can actually use Table Queries and Aggregations to get that column average from the last 30 days as a variable and use it in your app. Here’s how:
-
In your table, create a Query to filter your data by the last 30 days. You can use a static value, or an app input (whatever makes most sense for your use case).
-
The create an aggregation on the column you want to average
-
In your app, add the table, query, and aggregation
-
Insert a text variable and select “Tulip Table Aggregation” as your datasource and you then have your variable!