Timelion Visualization dropdown to edit comparison

Hi,

We are building interactive visualization to compare the sales data over timelion, ask is to compare the sales today to yesterday(this duration should be customizable), which i am able to achieve by having a offset on the timelion expression something like below. I want the offset to be dynamic. Do we have an option to build this with the help of drop down, something like when i choose 1 week, actual and the offset duration change to 1 week without having to choose the expression manually.

es(index=logs*, metric=cardinality:sales.id).label('Sales Current'), .es(index=logs*, metric=cardinality:sales.id, offset=-1d).label('Sales Yesterday')

Hi @nagabhushan.tr

Using Timelion directly is not achievable. What you can do is to use Canvas to add a dropdown filter with a simple table (using the csv function expression with a set of key, value rows like: last week,-1w) to create a filter and then add a line chart with the mentioned timelion query including the selected value from the dropdown in the offset parameter

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