7 Replies Latest reply on Jul 9, 2018 11:49 AM by Deepak Rai

# Calculated Field

I am new to Tableau and I have this question, hoping someone can help me to solve it..

Suppose I have this data

 Student Subjects Grade Student 1 Math A Student 1 Social Study A Student 1 Science A Student 2 Math B Student 2 Social Study A Student 2 Science A Student 3 Math B Student 3 Social Study B Student 3 Science A … … …

I want to generate a calculated field so that:

If a student received A in all subjects, then he's in List-A

If a student received one or more B in any subjects, then he's in List-B

If I get something like this it would be great.

 Student Subjects Grade Overall Student 1 Math A List A Student 1 Social Study A List A Student 1 Science A List A Student 2 Math B List B Student 2 Social Study A List B Student 2 Science A List B Student 3 Math B List B Student 3 Social Study B List B Student 3 Science A List B … … … …

• ###### 1. Re: Calculated Field

HI Ivory,

I think just a single calc field helps.

max/min is based on alphabetical order and B is bigger than A.

Thanks,

Shin

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

Thank you so much Shin!!

What if I don't use A or B, say, I want to label "good" or "bad" (A = Good and B=Bad), so there is no max/min order. Would that be easily achieve?

• ###### 3. Re: Calculated Field

In That case, You can Write 1 for Good and 0 for Bad and then you can do Max/Min

• ###### 4. Re: Calculated Field

Thanks a lot to both of you! I can solve the problem now.

• ###### 5. Re: Calculated Field

Then You can Close The Thread, If you got what you wanted.

• ###### 6. Re: Calculated Field

how to close it? Sorry it is my first time posting a thread....

• ###### 7. Re: Calculated Field

Since Shin Gave you CORRECT answer, go to his reply in your main thread, not in email. You will find CORRECT button under Shin's Reply. Just Press that.