Hello!
I am trying to create a punch card panel in a dashboard. I want to sort the X field on week number in ascending order and the Y on weekday in ascending order. My issue is that however I formulate the query, one of the axises will be in descending and the other in ascending. Here is my query:
index="*******" sourcetype=_json
| stats latest(Number_of_Commits) as Commits by week Day
| eval week_sort = case(
Day=="Monday", 1,
Day=="Tuesday", 2,
Day=="Wednesday", 3,
Day=="Thursday", 4,
Day=="Friday", 5,
Day=="Saturday", 6,
Day=="Sunday", 7
)
| eval sort_field = week_sort*10 + case(
Day=="Monday", 1,
Day=="Tuesday", 2,
Day=="Wednesday", 3,
Day=="Thursday", 4,
Day=="Friday", 5,
Day=="Saturday", 6,
Day=="Sunday", 7
)
| sort sort_field week_sort
The result of this query is as follows:
What am I missing to make both X & Y axises sort in ascending order?
Thanks in advance
... View more