Jump to content
Lyonel

Sorting with "Measures Samples Group By"

Recommended Posts

Hi,

I am trying to display on a graph the number of requests logged per service and keep only the top 5 over the last 3 month (to show the evolution).

But I cannot get to sort the data... Is it just me being a noob? Or is it not possible at this stage?

Here is what I get:

58935bdcf3a78_samplesgroupby.thumb.png.f9570675abc0e53693b6b1109637ee76.png

Here is what I would like (x3 as I need 3 month):

58935c4ea29b5_groupby.thumb.png.55bb0230a88a441f903f26812d0c205a.png

Any help would be appreciated!!! Thanks

Share this post


Link to post
Share on other sites

@Lyonel mmm... I don't think is possible :( ... maybe you could get the info you need from a report... I'll have a look if you like and if report would be a suitable alternative...

Share this post


Link to post
Share on other sites

@Victor a report would work indeed, it's just that I would like these stats on a dashboard... Any change a developer could look at it? Maybe a simple switch or "Order By" drop down would be enough?

Share this post


Link to post
Share on other sites

Hi @Lyonel

Just had a thought about this one. Perhaps a workaround here is to not use a measure, but to use the "SQL Group By" option when creating a chart. 

So my idea is to have 3 separate widgets - one each for 1, 2, and 3 months ago. And you use some SQL operations in the criteria to specify the date range instead of using the in built date range functionality. 

In my example below, this show "Last Months" Incidents, grouped by Service

Screenshot_4.png

The key thing here is that the Period Filtering is set to "None" but my criteria is set to:

h_datelogged >= LAST_DAY(NOW() - INTERVAL 2 MONTH) + INTERVAL 1 DAY and h_datelogged < LAST_DAY(NOW() - INTERVAL 1 MONTH)

(I'm sure there are cleaner ways to do this but this seemed to work for me :))

Then I would create two more of these widgets, and simply change the date range criteria to:

 

2 Months Ago:

h_datelogged >= LAST_DAY(NOW() - INTERVAL 3 MONTH) + INTERVAL 1 DAY and h_datelogged < LAST_DAY(NOW() - INTERVAL 2 MONTH)

 

3 Months Ago:

h_datelogged >= LAST_DAY(NOW() - INTERVAL 4 MONTH) + INTERVAL 1 DAY and h_datelogged < LAST_DAY(NOW() - INTERVAL 3 MONTH)

 

Then finally, stick them all onto a Dashboard, side by side, 

Would this work?

 

Kind Regards

Bob

 

 

Share this post


Link to post
Share on other sites

@Bob Dickinson that is not a bad idea! I will give it a try and let you know. But surely I am not the only one with this issue, am I?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×