5 Replies Latest reply on Oct 9, 2018 4:35 AM by Mahfooj Khan

# If AT LEAST one dimension is in another, then... Calculated Field Help?

Hello,

I have a data set with ITEM IDs (each unique), with Zones within each ITEM ID. Zones are not unique and can duplicate. I would like to create a calculated field that assigns a "YES" or "NO" to ITEM ID based on whether it contains at least 1 record of a D1 Zone. Below is a simple table representing my data.

 ITEM ID OUTPUT Zone 0004 NO A1 0005 YES D1 A1 0006 YES A1 C1 D1

Since ITEM ID 0004 is only in Zone 1, it's output would be "NO". Meanwhile, ITEM 0006 has 3 records, 1 of which is at least D1, therefore, it is a "YES".

I believe I need to create some Calculated Field in which { FIXED: ITEM ID: ???   } . I'm just stuck on the second part where I am able to specify that at least one of the zones is a D1. Thank you for the help!

• ###### 1. Re: If AT LEAST one dimension is in another, then... Calculated Field Help?

I think I figured it out... Can somebody confirm if this is the best way?

[Item Id] = { FIXED [Item Id]:MAX(IF [Zone]="D1" THEN { FIXED [Item Id]:MAX([Item Id])} END) }

• ###### 2. Re: If AT LEAST one dimension is in another, then... Calculated Field Help?

IF {FIXED ITEM ID:MAX(IF Zone="D1" THEN Zone End)}=Zone Then "Yes" Else "No" END

1 of 1 people found this helpful
• ###### 3. Re: If AT LEAST one dimension is in another, then... Calculated Field Help?

Hi,

More simple

{FIXED [Item Id]:MAX(IIF([Zone]='D1','YES','NO'))}

Mahfooj

1 of 1 people found this helpful
• ###### 4. Re: If AT LEAST one dimension is in another, then... Calculated Field Help?

Thank you!

• ###### 5. Re: If AT LEAST one dimension is in another, then... Calculated Field Help?

You're welcome!