Concat - fonction de graphique
Last updated: 01/09/2026
Concat() permet de combiner des valeurs de chaîne. Cette fonction renvoie la concaténation de chaînes agrégée de toutes les valeurs incluses dans l'expression évaluée pour chaque dimension.
Concat({[SetExpression] [DISTINCT] [TOTAL [<fld{, fld}>]]} string[, delimiter[, sort_weight]])
string
| Argument | Description |
|---|---|
| string |
Expression ou champ contenant la chaîne à traiter. |
| delimiter | Les valeurs peuvent être séparées par la chaîne indiquée dans l'argument 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. When 0 is used as the sort_weight argument value, sorting is not applied to the output. If the sort_weight argument is omitted, the function defaults to alphanumeric sorting. |
| SetExpression | Par défaut, la fonction d'agrégation couvre l'ensemble des enregistrements possibles définis par la sélection. Il est possible de définir un ensemble d'enregistrements alternatif à l'aide d'une expression d'analyse d'ensembles. |
| DISTINCT | Si le terme DISTINCT précède les arguments de la fonction, les doublons résultant de l'évaluation des arguments de la fonction sont ignorés. |
| TOTAL |
Si le terme TOTAL précède les arguments de la fonction, le calcul est effectué à partir de toutes les valeurs possibles au vu des sélections actives, et pas seulement à partir de celles qui sont associées à la valeur dimensionnelle active. Autrement dit, les dimensions du graphique ne sont pas prises en compte. En utilisant TOTAL [<fld {.fld}>], où le qualificateur TOTAL est suivi d'un ou de plusieurs noms constituant un sous-ensemble des variables de dimension du graphique, vous créez un sous-ensemble du nombre total de valeurs possibles. |
| SalesGroup | Amount | Concat(Team) | Concat(TOTAL <SalesGroup> Team) | Concat(Team, ', ', 0) | Concat(TOTAL <SalesGroup> Team, '', 0) |
|---|---|---|---|---|---|
| East | 14000 | Delta | AlphaBetaDeltaGammaGamma | Delta | GammaGammaAlphaDeltaBeta |
| East | 20000 | BetaGammaGamma | AlphaBetaDeltaGammaGamma | GammaGammaBeta | GammaGammaAlphaDeltaBeta |
| East | 25000 | Alpha | AlphaBetaDeltaGammaGamma | Alpha | GammaGammaAlphaDeltaBeta |
| West | 14000 | Eta | EpsilonEtaThetaZeta | Eta | ZetaEpsilonEtaTheta |
| West | 17000 | Epsilon | EpsilonEtaThetaZeta | Epsilon | ZetaEpsilonEtaTheta |
| West | 19000 | Zeta | EpsilonEtaThetaZeta | Zeta | ZetaEpsilonEtaTheta |
| West | 23000 | Theta | EpsilonEtaThetaZeta | Theta | ZetaEpsilonEtaTheta |
| Example | Result |
|---|---|
| Concat(Team) |
The table is constructed from the dimensions SalesGroup and Amount, and variations on the measure Concat(Team). Ignoring the Totals result, note that even though there is data for eight values of Team spread across two values of SalesGroup, the only result of the measure Concat(Team) that concatenates more than one Team string value in the table is the row containing the dimension Amount 20000, which gives the result BetaGammaGamma. This is because there are three values for the Amount 20000 in the input data. All other results remain unconcatenated when the measure is spanned across the dimensions because there is only one value of Team for each combination of SalesGroup and Amount. |
| Concat(DISTINCT Team,', ') | Beta, Gamma. because the DISTINCT qualifier means the duplicate Gamma result is disregarded. Also, the delimiter argument is defined as a comma followed by a space. |
| Concat (TOTAL <SalesGroup> Team) | All the string values for all values of Team are concatenated if the TOTAL qualifier is used. With the field selection <SalesGroup> specified, this divides the results into the two values of the dimension SalesGroup. For the SalesGroupEast, the results are AlphaBetaDeltaGammaGamma. For the SalesGroupWest, the results are EpsilonEtaThetaZeta. |
| Concat (TOTAL <SalesGroup> Team,';', Amount) | By adding the argument for sort_weight: Amount, the results are ordered by the value of the dimension Amount. The results becomes DeltaBetaGammaGammaAlpha and EtaEpsilonZEtaTheta. |
| Concat(Team, '', 0) | With sort_weight set to 0, the results are not sorted. |
| Concat(TOTAL <SalesGroup> Team, '', 0) | With sort_weight set to 0, the results are not sorted. Additionally, all the string values for all values of Team are concatenated because the TOTAL qualifier is used. |
Data used in example:
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 '|');