Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
asinghal0412
Partner
Partner

Adding text to fields in if condition

Dear Qlik Community,

I have a code below:

=if([Calendar Year]= year(today()),[Calendar Year/Month])

which gives the solution:

Jan 2021Feb 2021Mar 2021Apr 2021May 2021Jun 2021Jul 2021Aug 2021Sep 2021Oct 2021Nov 2021Dec 2021

 

I want to write a code to give below as a solution

Jan 2021 Actual

Feb 2021 ActualMar 2021 ActualApr 2021 ActualMay 2021 ActualJun 2021 ActualJul 2021 ActualAug 2021 ActualSep 2021 Actual

Oct 2021 Actual

Nov 2021 ActualDec 2021 Actual

 

I tried the code below but it does not work

=if([Calendar Year]= year(today()),[Calendar Year/Month]+'Actual')

Can anyone share how to achieve this goal?

Thanks,

Akash

2 Solutions

Accepted Solutions
GaryGiles
Specialist
Specialist

You need to use & instead of + for text.

=if([Calendar Year]= year(today()),[Calendar Year/Month]&'Actual')

View solution in original post

MayilVahanan

HI @asinghal0412 

For concatenate the string, you need to use "&" symbol in Qlik

=if([Calendar Year]= year(today()),[Calendar Year/Month] & ' Actual')

Thanks & Regards,
Mayil Vahanan R

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

You need to use & instead of + for text.

=if([Calendar Year]= year(today()),[Calendar Year/Month]&'Actual')

View solution in original post

MayilVahanan

HI @asinghal0412 

For concatenate the string, you need to use "&" symbol in Qlik

=if([Calendar Year]= year(today()),[Calendar Year/Month] & ' Actual')

Thanks & Regards,
Mayil Vahanan R

View solution in original post