# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
New Contributor III

## Pick only one of many data fields

Hello dear community, I'm having a problem with some charts that I hope you can help me with.

I have the following data about professors at a University with their grad code.

 ID Name GradCode 123 John 88 123 John 99 123 John 100 124 Mark 100 124 Mark 99

Here we have John and Mark. Both of them have more than one GradCode. The codes means: 88=PhD, 99= Masters, 100= Licenciate.

They have more than one because the systems keeps a record of the grads they had since they've been hired, and during that time both John and Mark kept studying and getting more degrees.

What I need to do, is show in a chart all the professors at the University that have a PhD, a Masters and a Licenciate Degree. The trick is that for John, I only need him to appear once with his PhD Degree, and Mark only once with his Masters Degree.

I need to show every professor only with his highest degree.

Hope you can help me with this.

Happy holidays

1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Pick only one of many data fields

Create a calculated dimension

then only one expression

=Count(Distinct ID)

7 Replies
Highlighted
MVP

## Re: Pick only one of many data fields

Create a straight table chart with dimensions ID and Name, then as expression

resp.

[I think the minimum value is what you need as highest grade, but not 100% sure]

Highlighted
MVP

May be this:

Dimension: Name

Highlighted
Partner

## Re: Pick only one of many data fields

i Have a look at the attach example

by using firstsortedvalue(Name , GradeCode) , you'll get the highest degree for each name

Highlighted
New Contributor III

## Re: Pick only one of many data fields

But what if I wanted to do 3 expressions to show in the chart?

So far I have these expressions:

For PhD's:

For Masters:

For Licenciate:

The problem is that John appears in all of them and I need him to appear just in the PhD bar on the chart.

Highlighted
MVP

## Re: Pick only one of many data fields

Create a calculated dimension

then only one expression

=Count(Distinct ID)

Highlighted
New Contributor III

## Re: Pick only one of many data fields

You mean on the script? or in the chart?

Highlighted
New Contributor III

## Re: Pick only one of many data fields

I'ts working so far!