- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2024 12:14 PM
I am working on an incident measure of "Percent Change of MTTR year over year" - with a breakdown by Business Service.
The basic formula is:
- ((MTTR This Fiscal Year-MTTR Last Fiscal Year)/MTTR Last Fiscal Year)*100
When both years have incidents closed - no problem.
However, some Business Services are new This Fiscal Year, to Last Fiscal Year is a zero.
In a spreadsheet, I would use this to overcome the issue of the 0 value for Last Fiscal Year
When I attempt this using what I can find in Docs.ServiceNow.Com I believe it is telling me this should be my format:
This is my error on SAVE:
When I replace the
else { 9 } with single digit - it saves and populates either the 1 or 9 ,
but instead of the 1, I need the equation to run.
I know I'm overcomplicating this - so I hope someone will just kickstart me into the right solution. Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2024 02:21 PM - edited ‎12-20-2024 02:43 PM
To the best of my knowledge, you cannot use logical operators like "if...else" in an indicator formula, only arithmetic operators like +,-,x,/, along with predefined time series aggregations and PAFormulaUtils methods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2024 12:30 AM
Hi @jstoessel ,
you can’t use logic scripting in the formula indicator. instead you should state your logic in a scripted automated indicator for the data collection.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2024 02:21 PM - edited ‎12-20-2024 02:43 PM
To the best of my knowledge, you cannot use logical operators like "if...else" in an indicator formula, only arithmetic operators like +,-,x,/, along with predefined time series aggregations and PAFormulaUtils methods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2024 12:30 AM
Hi @jstoessel ,
you can’t use logic scripting in the formula indicator. instead you should state your logic in a scripted automated indicator for the data collection.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/