JosephW1
Tera Guru

Do you have a stakeholder that can't stand to see weekends in trend charts?
find_real_file.png

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 isHowever, 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
find_real_file.png

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

Comments
JosephW1
Tera Guru

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.

Saloni Suthar
Mega Sage
Mega Sage

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. 

 

Carlos Aparicio
Giga Explorer

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]]; }

Version history
Last update:
‎02-06-2023 08:31 AM
Updated by:
Contributors