Remove duplicates in incident metric table Report

poojitha bn
Giga Expert

Hi Experts,

I have to remove duplicates in Incident_metric table report.

Currently I am trying to remove using script include but I couldn't achieve it. Can anybody help me doing this.

Report:

find_real_file.png

Script Include:

find_real_file.png

Can anyone help me to fix it.

 

1 ACCEPTED SOLUTION

Hi Poojitha,

The above code will not work as it returns incident number which is same for duplicate records so the report will display duplicate records. As per your screenshot, if the function returns 'FVSD_2337' then report will still display all three records as they all satisfy the condition.

So you need to return unique value like sys_id of one of the duplicate so the report doesn't display the other duplicate.

 

Let me know if it helps.

View solution in original post

13 REPLIES 13

Hi Poojitha,

Could you tell us the actual code resolved the issue?

Thanks

Hi,

 

We couldn't able to remove duplicates but my customer is convinced for duplicates.

Does it related to database views duplicates?

Currently i am facing same.

Hi Nagaraju,

To remove duplicates, use the count distinct option under the aggregation field, then select the Sys ID of the incident. See screenshot.
I must also say, rather than using a script to run this type of report, maybe using the database view would be a better option. The incident_metric would usually cater for this kind of scenario.
See attached screenshot