Count Distinct on Incident_Metric -> Number column

brandimore
Kilo Expert

Hello

I would like to count distinct on the Number column in this table. Unfortunately it's not an option when I go to review the list of Aggregates. I saw another post about creating a new Indicator and Source for this to work. This seems like a lot of work for something this simple, but I did this anyways. When I'm in my report it's not an option to select.

I want to make sure that I'm not making more work for something. Can someone confirm how you can make a new field as an option to Aggregate?

Thanks

Instanbul is the version I'm running. We do have PA also.

find_real_file.png

1 ACCEPTED SOLUTION

gr.reference_field = 'mi_field_value';


View solution in original post

21 REPLIES 21

Okay, I'm back at it. I want to confirm, I still take out the MI to make a field value. Such as:



  1. var sysID = 'd0871acedb004780fd9930cf9d96191b';  
  2. var gr = new GlideRecord('sys_ui_hp_reference');  
  3. if (gr.get(sysID)) {  
  4.   gr.reference_field = 'field_value';  
  5.   gr.setWorkflow(false);
  6.   gr.update();   }  


(ignore the numbers, that's copy\paste)



I get this when I put the code in:


find_real_file.png



but when I open it up, it's not associated to the field value:


find_real_file.png



I can tell it's not working because it's not filter on the field value in the dashboard.



Is it possible you have 10 minutes for a call? I'm sure I'm missing something small here.


Thanks!


gr.reference_field = 'mi_field_value';


Got it. Changed it to MI_field_value



I think it's working. I'm going to continue testing....... THANK YOU! I'll let you know tomorrow.


It looks like all is working. Thanks very much for your help.


Just curious, what does "Cancel after 4 hrs mean"?.   Cancel the script if it's still running? Do you leave this checked on?


Is there any way to edit a script that's been submitted? I don't see that as an option in my window.



find_real_file.png



Thanks!


Good!



Thats if you have a long running script, scripts like this should complete in less then a second.


After a script has run, you need to create another script to if you want to undo


Can you mark this answered.