
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
06-17-2021 04:03 PM - edited 02-06-2023 08:31 AM
Do you have a stakeholder that can't stand to see weekends in trend charts?
But, you're concerned about deleting/preventing weekend scores due to certain groups who perform work at that time, aren't you?
And the stakeholder won't take no for an answer. What to do...
I found a handy way to stop weekends from being plotted without deleting/preventing their scores! That way both this stakeholder and our weekend groups can be happy. Without collecting any more redundant scores, that is. However, this method is not compatible with the "Real-time Score" visualization, so you cannot use it to compare today to the last business day!
STEP 1: Create a formula indicator
STEP 2: Add this formula
var sched = new GlideSchedule('6823887f1bd6d85013bdb913cc4bcbf2'); //24x5 weekdays excluding holidays, floating timezone (custom, make your own) if (sched.isInSchedule(score_start)) { //defaults to user's time zone [[Your Indicator HERE]]; }
STEP 3: Enable 'Render continuous line' (optional)
STEP 4: Add the formula indicator from STEP 2 to a widget, and then to your dashboard
VIOLA: Our new trend line
Not sure if it's the best idea - it seems okay - but if it's what your stakeholder needs... Well, you know what I mean.
@Aaron Munoz Thanks again for the idea!
I hope that helps someone out.
Kind Regards,
Joseph
- 1,363 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Personally, I quite like having the weekends in the trend line. It gives me a reference point that empowers me to, at-a-glance, say "5 weeks ago we had a spike on that Friday" whereas I cannot quickly quantify the amount of weeks ago after hiding the weekends.
But to each his own.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Joseph,
When I tried the above script into my formula indicator, it is now allowing me to save the indicator because it says 'invalid insert'. Unsure if I am doing something wrong.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Dear Joseph,
Very nice feature. However, I have same issue than Joseph. I tried multiple ways to add the code and then the indicator but the error is always there.
What would be the right sintax for formula like:
( [[Number of new incidents > Priority = 1 - Critical]] / [[Number of new incidents]] ) * 100
Code:
var sched = new GlideSchedule('6823887f1bd6d85013bdb913cc4bcbf2'); //24x5 weekdays excluding holidays, floating timezone (custom, make your own) if (sched.isInSchedule(score_start)) { //defaults to user's time zone [[Your Indicator HERE]]; }