fbaligand / kibana-enhanced-table

Kibana visualization like a Data Table, but with enhanced features like computed columns, filter bar, and “Split Cols” bucket
Apache License 2.0
309 stars 64 forks source link

How can i add a string column based on values of previous column? #154

Closed Shivamyadav2512 closed 3 years ago

Shivamyadav2512 commented 3 years ago

Say i have col0 of integers ranging 0 - 100 I want col1 to be Great, Good, bad and so on based on the value of col0 - say > 60 is Great.

I found this col0 > 60 ? 'Great' : 'Need to another condition here' how can i add more condition in it for rest of the ranges?

fbaligand commented 3 years ago

Hello,

You can do like this: col0 > 60 ? 'Great' : (col0 > 40 ? 'Good' : 'Bad')

Shivamyadav2512 commented 3 years ago

Thank you @fbaligand