Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dzhsa001
Contributor III
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:

img.png

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

1 Solution

Accepted Solutions
sunny_talwar

The third parameter of Concat takes the Sort Order

Concat - script function ‒ QlikView

Capture.PNG

View solution in original post

26 Replies
sunny_talwar

May be you can do this

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

sunny_talwar

The third parameter of Concat takes the Sort Order

Concat - script function ‒ QlikView

Capture.PNG

dzhsa001
Contributor III
Contributor III
Author

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)

sunny_talwar

Are you trying to resolve this?

Comparison based on the group of fields

dzhsa001
Contributor III
Contributor III
Author

I have a similar issue

sunny_talwar

Oh okay...

dzhsa001
Contributor III
Contributor III
Author

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

sunny_talwar

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

dzhsa001
Contributor III
Contributor III
Author

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>?