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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula 1

Status
Not open for further replies.

michelin

Technical User
Dec 18, 2011
38
US
Dear All,

I'm having trouble with my formula. I'm using CR vr. 12.

I have a report:

Incident Unit Area
1 a a
1 b a
1 c a
2 a a
2 b a
3 b a
3 d a

(unit 'a' is from area 'a', unit 'b' is from area 'b'...). I just need to see an incident where there was no unit 'a' at all- so incident number 3.

I used the formula:
if not ({unit} = 'a') and {area}='a' then 'show'
else 'ignore'..

but i'm getting results:
Incident unit Area
1 b a
1 c a
2 b a
3 b a
3 d a


Some advice, please? Thank you!!
 
Michelin,

The most simple way (i can think of) is to group on Incident #, and create a formula such like:

{@Counter_EventA}
Code:
IF {Table.Unit}="a" THEN 1 ELSE 0

Then use Group Selection Criteria such like:
Code:
Sum(@Counter_EventA},{Table.Incident Number})=0

This will show only those groups where a "Count" of "Unit 'a'"s is zero (Unit a does not exist in the group).

Combinations/variations on the above could be used to show only those groups with no 'a' and does have a 'c' (Group Selection like: Sum({Counter_c},{Incident #})>0 to obtain a group where "at least 1" of something exists).

Hope this helps! Cheers! [smile]

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top