Jump to content

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

Link to post
Share on other sites
  • 2 weeks later...

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

 

 

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
×
×
  • Create New...