Help with Script for Count Distinct on Instance Field

Moe13
Tera Expert

Hello Experts!

 

I need help with Count Distinct on a report. I have a indicator on [asmt_metric_result] table and I am trying to use the Count Distinct on the Instance field but it doesn't seem to be working. I tried with basic reporting and for each metric, I can see the total count per month. However for PA, the numbers are way off and figured I can achieve this with script but I'm not proficient in scripting. Could you please help with the script to achieve?

 

Moe13_0-1707167090927.pngMoe13_1-1707167119953.png

 

1 REPLY 1

Cadmila21
Tera Contributor

 

I'd be glad to assist you with counting distinct instances in your report, but I'll need more context to provide the most effective solution. Unfortunately, I cannot access or process the attached images due to privacy and security restrictions. However, I can offer general guidance and potential approaches based on the textual information you've provided.

 

Key Considerations:

 

Instance Field: Please clarify the structure and characteristics of the "Instance" field within the asmt_metric_result table. What type of data does it contain (text, numbers, identifiers)? Does it have unique values, or are there duplicates?

Jeetwin App Integration: If the Jeetwin app interacts with the data, describe its role and the potential impact on instance counting. What specific functionality or reports use the instance count?

Desired Outcome: Explain the exact objective you're trying to achieve by counting distinct instances. Are you looking for the total number of unique instances across all data, or distinct counts within specific groups (e.g., per month, per metric)