Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alisonpwallis
Creator
Creator

Combining fields

Hi All,

I am trying to create a new field which combines two fields that I already have using an expression. I have two sets of data from two different years with the same fieldname for one field [Crse/Course Title] and a new field in the second data set [Qualification Aim]. In the first year the data relating to the qualification aim (e.g. BSc, PhD) of a degree was combined with it's title. So for example 'BSc Psychology'. In the second year, the qualification aim was a separate field so the title would just be 'Psychology' and the 'BSc' recorded in the [Qualification Aim] field. What I want to do is to combine the data as follows:

=if([Qualification Aim]<>' ',[Qualification Aim]&' '&[Crse/Course Title],[Crse/Course Title])

I've also tried

=if([Qualification Aim]=' ',[Crse/Course Title],[Qualification Aim]&' '&[Crse/Course Title])

I get the same text in both fields after applying this calculation BUT I get a space before the Course Title for the records where the data is now a combination of Qualification Aim and Course title - like this :

BSc Pscyhology

BSc Psychology

What I want to do is reduce the number of records in the list box by half so when the 'BSc Psychology' selection is made I get data for both data sets.

Can anyone help?

Thanks

Alison

1 Reply
christian77
Partner - Specialist
Partner - Specialist

Hi.

Try trim(Field) to trim your fields.

If that does not work, replace(Field,' ','')