How to set week data 100% if that week data is zero in dashboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 09:41 AM
Hi Team,
How to set week data 100% if that week data is zero in the dashboard?
for example, I have used a formula indicator.
var bs= new GlideRecord('cmdb_ci_service');
bs.addEncodedQuery('used_for=Production');
bs.query();
var count = bs.getRowCount(); //Get total business service
var a =count(Total business service) *168;
var b = [[Total number of time in a week(problem)]]; /This is an indicator on outage table data show as configuration item by
var result= ((a-b)/168)/100;
result;
Q: I want to show weekly data suppose if week 8 data is zero then It will as 100%,
If Weekly data is greater than zero then it will show like: {{( (Total Business service )*24*7) - (Total number of time in a week)}/168}/100;