# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

New Contributor III

## Order of concatination

Hi,

I have a function that creates a string based on the results of the adjacent field via concatination. But, the issue is that the order is not preserved at the end.

Using this formula :

=Concat(TOTAL <School, Class> Aggr(If(Excellent > Good, 'yes', 0), Year, School, Class), '|')

Output is like:

Normaly, the result should be "yes|0|yes", but its "0|yes|yes".

Is it possible to somehow resolve this issue?

updated formula due to wrong field existence

Tags (4)
1 Solution

Accepted Solutions
MVP

## Re: Order of concatination

The third parameter of Concat takes the Sort Order

26 Replies
MVP

## Re: Order of concatination

May be you can do this

=Concat(TOTAL <School, Class> Aggr(If(Excellent > Good, 'yes', 0), Year, School, Class), '|'), 'yes', Year)

MVP

## Re: Order of concatination

The third parameter of Concat takes the Sort Order

New Contributor III

## Re: Order of concatination

Great! That's something I needed. I updated the formula, so at the end it should be:

=Concat(TOTAL <School, Class> Aggr(If(Excellent > Good, 'yes', 0), Year, School, Class), '|',Year)

MVP

## Re: Order of concatination

Are you trying to resolve this?

Comparison based on the group of fields

New Contributor III

## Re: Order of concatination

I have a similar issue

MVP

## Re: Order of concatination

Oh okay...

New Contributor III

## Re: Order of concatination

It is really strange way of solving this with string functions, but still it works.

MVP

## Re: Order of concatination

Yup, the only thing with that post is that there are gaps in the year. so, it goes from 2011, 2012 to 2014... so I am not sure if just concat will work... but yes, it is def. an option

New Contributor III

## Re: Order of concatination

stalwar1‌, I have one addition. What if the class field is conditional. Is it possible somehow to adapt the concatenation that in case of disabling the class field, it adapts for the <school, year>?