Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning friends, how can I use CONCAT, eg
= Concat ('name', sum (qty))
tks
Try: ='Result = ' & sum(qty) & ' Exams'
Hi rocha.qkw,
The concat function returns the aggregated string concatenation of all values of expression iterated over a chart dimension.
concat( Code, ';' )
concat( FirstName&' '&LastName, ',' )
Regards
thanks for the return, I need to put on the label of the chart a name before the result
= sum (qty) = 10
exams
Result: 10 Exams
it would
Dear,
http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/19/the-concat-function
follow the link which will explain you clearly about concat function.
Thanks,
Mukram
Try: ='Result = ' & sum(qty) & ' Exams'
thanks for the return, I need to put an outcome + a name, eg
= sum (qty) * 10 = 250
result = 250 units
need to add the word units in the result.
tks
thank you, you are to be congratulated
muito obrigado, você está de parabéns
Luis Claudio Rocha
Concat() is used to combine string values. The script function returns the aggregated string concatenation of all values of the expression iterated over a number of records as defined by a group by clause.
Syntax:
Concat ([ distinct ] string [, delimiter [, sort-weight]])
Return data type: string
Arguments:
The expression or field containing the string to be processed.
Argument | Description |
---|---|
string | The expression or field containing the string to be processed. |
delimiter | Each value may be separated by the string found in delimiter. |
sort-weight | The order of concatenation may be determined by the value of the dimension sort-weight, if present, with the string corresponding to the lowest value appearing first in the concatenation. |
distinct | If the word distinct occurs before the expression, all duplicates are disregarded. |
Examples and results:
Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.
Example | Result | |
---|---|---|
TeamData: LOAD * inline [ SalesGroup|Team|Date|Amount East|Gamma|01/05/2013|20000 East|Gamma|02/05/2013|20000 West|Zeta|01/06/2013|19000 East|Alpha|01/07/2013|25000 East|Delta|01/08/2013|14000 West|Epsilon|01/09/2013|17000 West|Eta|01/10/2013|14000 East|Beta|01/11/2013|20000 West|Theta|01/12/2013|23000 ] (delimiter is '|'); Concat1: LOAD SalesGroup,Concat(Team) as TeamConcat1 Resident TeamData Group By SalesGroup; | SalesGroup East West | TeamConcat1 AlphaBetaDeltaGammaGamma EpsilonEtaThetaZeta |
Given that the TeamData table is loaded as in the previous example: LOAD SalesGroup,Concat(distinct Team,'-') as TeamConcat2 Resident TeamData Group By SalesGroup; | SalesGroup East West | TeamConcat2 Alpha-Beta-Delta-Gamma Epsilon-Eta-Theta-Zeta |
Given that the TeamData table is loaded as in the previous example: LOAD SalesGroup,Concat(distinct Team,'-',Amount) as TeamConcat2 Resident TeamData Group By SalesGroup; | Because the argument for sort-weight is added, the results are ordered by the value of the dimension Amount. | |
SalesGroup East West | TeamConcat2 Delta-Beta-Gamma-Alpha Eta-Epsilon-Zeta-Theta |