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: 
Anonymous
Not applicable

how to concat a string with a field

I need to concatenate a string 'P' with another field Priority. Priority has values 1,2,3,4,5

Essentially the values in the revised_priority need to be P1,P2,P3,P4,P5 instead of 1,2,3,4,5

i tried doing the following but it shows invalid expression so i am not sure what is wrong with my expression

load
*,
concat('P'&Priority) as Revised_Priority

Resident Problems group by [Problem Number];

can anybody please help me with the syntax?

1 Solution

Accepted Solutions
sushil353
Master II
Master II

hi,

the problem here will be with Load *,

try this:

load
[Problem Number],
concat('P'&Priority) as Revised_Priority
Resident Problems group by [Problem Number];

The above script should work..

so the thumb rule is if you are using group by then include all the fields in group by which are in your select/load statement.

HTH

Sushil

View solution in original post

3 Replies
sushil353
Master II
Master II

hi,

the problem here will be with Load *,

try this:

load
[Problem Number],
concat('P'&Priority) as Revised_Priority
Resident Problems group by [Problem Number];

The above script should work..

so the thumb rule is if you are using group by then include all the fields in group by which are in your select/load statement.

HTH

Sushil

vinieme12
Champion III
Champion III

just this much should work

load
*,
'P'&Priority as Revised_Priority
Resident Problems;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Thanks..both the solutions worked fine