Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Buenos días.
Necesitaría vuestra ayuda.
Me gustaría realizar una concatenación de texto cogiendo resultado de la elección de varios segmentos de datos. Os explico el caso concreto para que se entienda mejor. El contexto es un equipo de futbol base. Yo tengo 8 segmentos, un segmento para cada posición en el campo. Cada uno de ellos me deja seleccionar 1 jugador de los 10 jugadores del equipo. Lo que necesitaría es obtener una medida con la concatenación de los 8 jugadores seleccionados (uno en cada posición).
La composición resultante, por ejemplo:
MARC. B, ALEJANDRO, GUILLEM, MÁXIMO, ANDRES, LUIVI, GABI, LUKAS
Quiero que me seleccione de una tabla donde en una o varias filas encontraré esta combinación y que me dé como resultado el valor de una columna de la tabla (por ejemplo, goles marcados por esta combinación).
No se si me he explicado.
Os envío dos pantallazos para entenderlo mejor.
Muchas gracias,
Solved! Go to Solution.
Hi @Sergi_Mulet ,
Thanks lbendlin for the quick reply. I have some other thoughts to add:
(1) We can create eight slicer tables for eight locations. Note that there is no model relationship between these eight tables.
BANDA DERECHA = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
BANDA IZQUIERDA = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
BANDA IZQUIERDA2 = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
DEFENSA DERECHO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
DEFENSA IZQUIERDO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
MEDIO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
PIVOTE = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
PORTERO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
(2) We can create measures.
Measure =
SELECTEDVALUE ( 'PORTERO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'DEFENSA IZQUIERDO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'DEFENSA DERECHO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( PIVOTE[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( MEDIO[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA IZQUIERDA'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA DERECHA'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA IZQUIERDA2'[DEFENSA IZQUIERDO] )
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sergi_Mulet ,
Thanks lbendlin for the quick reply. I have some other thoughts to add:
(1) We can create eight slicer tables for eight locations. Note that there is no model relationship between these eight tables.
BANDA DERECHA = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
BANDA IZQUIERDA = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
BANDA IZQUIERDA2 = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
DEFENSA DERECHO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
DEFENSA IZQUIERDO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
MEDIO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
PIVOTE = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
PORTERO = VALUES('POSICIONES JUGADORES'[DEFENSA IZQUIERDO])
(2) We can create measures.
Measure =
SELECTEDVALUE ( 'PORTERO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'DEFENSA IZQUIERDO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'DEFENSA DERECHO'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( PIVOTE[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( MEDIO[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA IZQUIERDA'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA DERECHA'[DEFENSA IZQUIERDO] ) & ","
& SELECTEDVALUE ( 'BANDA IZQUIERDA2'[DEFENSA IZQUIERDO] )
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Muchas gracias.
Es lo que buscaba!!! Ya lo he creado tal y como me dijiste y funciona la concatenación. Ahora solo me faltaria que el valor concatenado me de por ejemplo los goles de esta combinación (alineación) y no los del partido.
Como no me deja insertar el archivo .pbix os lo envío con este enlace.
El resultado, por ejemplo de los goles a favor debería dar 1, pues son los goles a favor del tercer cuarto, y no 6 que son el total de goles del partido.
Muchas gracias. de verdad!!
Un saludo
Thank you so much.
It's what I was looking for!!! I have already created it just as you told me and the concatenation works. Now I would only need the concatenated value to give me, for example, the goals of this combination (lineup) and not those of the match.
Since it won't let me insert the .pbix file, I'm sending it to you with this link.
The result, for example of the goals scored, should be 1, since they are the goals scored in the third quarter, and not 6, which are the total goals for the match.
Thank you so much. really!!
All the best
Muchas gracias por contestar.
Si, las posiciones no cambian, son fijas, lo que cambia es el jugador en cada posición. Lo intentaré explicar, a ver se te ocurre otra solución. Yo la temporada pasada iba anotando en un excel la alineación (1 jugador en cada una de las ocho posiciones fijas) e iba anotando los goles a favor y en contra de cada alineación. Eso me daba, por ejemplo, unas 20 combinaciones de jugadores con sus goles a favor y en contra.
Lo que quería hacer ahora en Power Bi, es poder seleccionar una alineación como resultado de seleccionar un jugador en cada segmentador que tengo (1 segmento- 1 posición en el campo) y conseguir concatenando el resultado de cada uno de los segmentos, de forma que tendría una combinación de ocho jugadores (alineación). Siempre sería el mismo orden. Primero el porteo, segundo el defensa izquierdo… y último el delantero. Por ejemplo:
MARC. B, ALEJANDRO, GUILLEM, MÁXIMO, ANDRES, LUIVI, GABI, LUKAS
El resultado de esta segmentación, tendría que utilizarse como un segmentador que estuviera enlazado con la tabla descrita al principio y poder buscar en la columna alineación de la tabla de Excel el registro con la combinación obtenida con la segmentación.
Lo que conseguido es obtenerlo en un solo segmento de forma multiple.
Thank you very much for your answer.
Yes, the positions do not change, they are fixed, what changes is the player in each position. I will try to explain it, see if you can think of another solution. Last season I was writing down the alignment in an excel (1 player in each of the eight fixed positions) and I was writing down the goals for and against each alignment. That gave me, for example, about 20 combinations of players with their goals.
What I wanted to do now in Power Bi is to be able to select a alignment as a result of selecting a player in each data slicer that I have (1 segment - 1 position on the field) and achieve by concatenating the result of each of the segments, so that would have a combination of eight players (alignment). It would always be the same order. First the carrying, second the left defender... and last the forward. For example:
MARC. B, ALEJANDRO, GUILLEM, MÁXIMO, ANDRES, LUIVI, GABI, LUKAS
The result of this segmentation would have to be used as a data slicer that was linked to the table described at the beginning and be able to search in the alignment column of the Excel table for the record with the combination obtained with the segmentation.
What we have achieved is to obtain it in a single segment.
As I said, CONCATENATEX is the wrong approach. Use the values as is.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
(for example, goals scored by this combination)
At these exact positions, or regardless of position?
What have you tried so far? Remember that everything in DAX is a table, so you will want to create a table variable that has a single column with all selected players in the rows. Concatenating them is not actually productive.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |