Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This seems wrong - Any ideas?

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
Hello All - I have the following formula in place to return an id:

if {MEMBER_OF.GROUP_ID} <> 'NTS' and
{PROBLEM_HISTORY.ENTRY_TYPE} = 'Problem Transfer' and
{PROBLEM_HISTORY.ENTRY} like '*transferred to Group NTS*' then {PROBLEMS.PROBLEM_ID};

After I get the results of the formula, I run a distinct count on it. My issue is, The distinct count is counting the same id each time it is encountered, which it shouldn't when using a distinct count. Any ideas?

Thanks for any help given.
Brian
 
Your formula looks okay. Would you be able to send me a copy of the report to take a peek at?

mbarron(@)arkwright.com Mike
If you're not part of the solution, you're part of the precipitate.
 
Brian,
I looked at your report, and it is do the Distinct Counting correctly. I suppressed all detail lines where the transToNTS field was equal to &quot;&quot; (the results of your above formula if the conditions are not met). The result was 16 lines of data with 04938286 having one duplicate and the other 14 lines were unique. Mike
If you're not part of the solution, you're part of the precipitate.
 
Thanks for you help Mike, but shouldn't that duplicate id only be counted once? I made the following change to the formula and it returns 15..

shared numbervar total;
if {MEMBER_OF.GROUP_ID} <> 'NTS' and
{PROBLEM_HISTORY.ENTRY_TYPE} = 'Problem Transfer' and
{PROBLEM_HISTORY.ENTRY} like '*transferred to Group NTS*' then total := DistinctCount ({PROBLEMS.PROBLEM_ID});
Brian
 
It is being counted only once.

There are 16 lines of data 14 unique nuumbers + 1 number that has a duplicate = 15 distinct numbers.

Mike
If you're not part of the solution, you're part of the precipitate.
 
D'oh. Sorry, brain freeze.

It's counting the &quot;&quot; as a record. I'm not sure where I got the 15 part in my second post.

Use this as your summary field:

If minimum({@transToNTS)=&quot;&quot; then distinctcount({@transToNTS)-1
else
distinctcount({@transToNTS) Mike
If you're not part of the solution, you're part of the precipitate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top