- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 12:35 AM
Hi all.
Is there any way I can export the score of formula indicator?
I am looking to create a scheduled job that sends the score of formula indicator via email.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 08:22 AM
Score start and end give you the first and last date of the period (for daily, this is the same, for monthly, this is the first day of the month and the last). You can then get the day of the week from this date decide to show it or NULL it out.
res = {{Number of open incidents}};
if(score_end.getDayOfWeekLocalTime() >= 6)
{
res = null;
}
res;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 08:22 AM
Score start and end give you the first and last date of the period (for daily, this is the same, for monthly, this is the first day of the month and the last). You can then get the day of the week from this date decide to show it or NULL it out.
res = {{Number of open incidents}};
if(score_end.getDayOfWeekLocalTime() >= 6)
{
res = null;
}
res;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 08:49 AM
Awesome Adam!
Just a silly question.. Should the script be added to "formula" session?
Once setting the value to null, mind to help me in getting the average score for the month?
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 08:56 AM
I'm not sure what you mean by formula session.
As for the average, NULL should be excluded from an AVG so if you only have 20 weekdays in a month, I would expect that the average is based on the sum of the 20 divided by 20 (not the total number of days in the month). However, I haven't tested that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 09:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2018 09:08 AM
Yes. The example above is a valid formula to show the number of open incidents on weeks days only.