10 Replies Latest reply on Jun 20, 2018 3:06 AM by Jim Dehner

# Calculated Field for 2 Dimensions

I have a dataset where 1 column produces more than 1 result in the other.

I want the following Calculation:

IF Enroll Track = 'K-3 Plus' AND Section IN Both 'EY' and 'K3' Then 'Correct'

ELSEIF Enroll Track = 'K-3 Plus' and Section NOTIN both  'K3' Then 'Not Correct'

Basically need to list those Who

Enroll Track = 'K-3 Plus' and null Section OR

Enroll Track = 'K-3 Plus' and only have Section of 'EY'

For Example: Below Acosta Jr, Javier should be flagged because he's not in both EY and K3

• ###### 1. Re: Calculated Field for 2 Dimensions

Without see the workbook this will only get you close

{fixed [Name],[enrolltrack]:  if min(section) <> max(section)  then 'Correct' else 'Not Correct' end   }

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 2. Re: Calculated Field for 2 Dimensions

Thank you Jim,

This is my first post and your prompt reply is very much appreciated.

Seems this may work, however how do I add the following:

IF Enroll Track = K-3 Plus and Section = K3 Then 'Correct'

Story behind the Data: A student may have both Section EY and K3 with an Enrollment Track of K-3 Plus, or at least have a Section of K-3, otherwise they must be flagged.

Angel and Sotelo produced what I was looking for

These are the values in Section

When in K-3 Plus(Enroll Track) then Section must not be NULL and must at least include a Section in "K3"

• ###### 3. Re: Calculated Field for 2 Dimensions

Ok then we brute force that case first

IF [Enroll Track] =' K-3 Plus' and Section = 'K3 'Then 'Correct'

elseif {fixed [Name],[enrolltrack]:  if min(section) <> max(section)  then 'Correct' else 'Not Correct' end   }

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

• ###### 4. Re: Calculated Field for 2 Dimensions

Seems we're getting closer, now looks like a matter of syntax

Expected 'THEN' to match 'IF' at character 0

• ###### 5. Re: Calculated Field for 2 Dimensions

Syntax

I dont have a way to check this so you may need to play with it

IF ([Enroll Track] =' K-3 Plus' and Section = 'K3 ) Or

{fixed [Name],[enrolltrack]:  min(section) <> max(section) } then 'Correct' else 'Not Correct' end

1 of 1 people found this helpful
• ###### 6. Re: Calculated Field for 2 Dimensions

Thank you so very much! You're a genius

• ###### 7. Re: Calculated Field for 2 Dimensions

Hi Ruby,

Thanks

Deepak

If it Helps, Pl mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• ###### 8. Re: Calculated Field for 2 Dimensions

Hello Deepak,

Thank you so much for the level of detail you provided in your response! I hadn't though about adding color to those flagged as incorrect. Your time and effort is very much appreciated. Provides a sense of relief to know help is out there. Million thanks to you and Jim Dehner!!!

• ###### 9. Re: Calculated Field for 2 Dimensions

• ###### 10. Re: Calculated Field for 2 Dimensions

Thanks Ruby