Page 1 of 1

filtering "distinct" values count from the output

Posted: Wed Aug 07, 2013 11:23 am
by Maximus_Jack
Hi
the below rule

col0="orange"
and col1="apple"
and col2 ="fruits"

output
====
shopname, col0, col1, col2
xxxx,orange, apple, fruits
xxxx,orange, apple, fruits
yyyy,orange, apple, fruits
yyyy,orange, apple, fruits
yyyy,orange, apple, fruits

produces a list of all the records matches the condition, but the output result contains a lot of duplicates on a particular column ( for example column name "shopname" ), if i want to produce a row count of only the unique records from column "shopname" satisfying the above rule,
anyway to do that in IA

select count(distinct shopname)
from table1
where col0="orange"
and col1="apple"
and col3="fruits"

cheers
Mj

Posted: Wed Aug 07, 2013 4:40 pm
by ray.wurlod
Wouldn't think so - it's not really a rule, is it? You have EXISTS and you have EXISTS n, which are rules, but how does your count fit in to a data rule?

Posted: Wed Aug 07, 2013 8:00 pm
by stuartjvnorton
Have you tried Exclude Duplicate Records (or whatever it's called on the output tab)? Make the output only return the shopname and see if it works.

Posted: Wed Aug 07, 2013 11:33 pm
by ray.wurlod
Stuart, it seemed to me that counts were required. Otherwise your approach is valid.

Posted: Thu Aug 08, 2013 6:59 am
by stuartjvnorton
Yeah, I thought maybe the Exclude Duplicates would show in the pass/fail.

Of course if he's using 9.1 he could use Exclude Duplicates, then cascade the results to another rule that always succeeds. The Pass value of that rule should be the number.

Getting a bit ridiculous though.