Skip to main content




En tiempo real, es posible que obtenga los datos que tienen columnas fusionadas (una columna con demasiada información). En esa situación, puede usar la opción Dividir columnas de Power BI para dividir esa columna en varias columnas. Este artículo le muestra cómo dividir columnas en Power BI con un ejemplo.

 

How to split columns in Power BI

Para demostrar esta opción de columnas divididas de PowerBI, usaremos la tabla Text Employee que importamos en el artículo Enter Data.

To split columns in an existing table, click the Edit queries option under the Home tongue.

how-to-split-columns-in-power-bi-1-4429281<>how-to-split-columns-in-power-bi-1-4429281

Clicking Edit queries The option opens a new window called Editor de Power Query. En la captura de pantalla siguiente, puede ver que la tabla de Power BI tiene solo una columna.

how-to-split-columns-in-power-bi-2-8293125

Antes de comenzar a dividir las columnas en Power BI, permítanme duplicar esta columna. Para hacerlo, haga clic derecho en el nombre de la columna y seleccione Duplicate column context menu option.

 

how-to-split-columns-in-power-bi-3-5556644

Now you can see the Duplicate column

how-to-split-columns-in-power-bi-4-9331982

Para dividir las columnas en una tabla de Power BI, haga clic con el botón derecho en la columna que desea dividir para abrir el menú contextual. Por favor seleccione el Split columns and then select By Delimiter option.

how-to-split-columns-in-power-bi-5-1983423

Select the By delimiter The option opens the following window.

  • Select or enter delimiter: En la lista desplegable, seleccione el delimitador que desea utilizar como carácter dividido. Si no está en la lista, seleccione la opción Personalizado y especifique ese carácter personalizado.
  • Leftmost delimiter: This option splits the leftmost string before the first delimiter.
  • Rightmost delimiter: This option splits the rightmost string after the last delimiter.
  • Each occurrence of the delimiter: The text is split at each occurrence of a delimiter.
how-to-split-columns-in-power-bi-6-4248304

Estamos seleccionando Coma como delimitador. Recuerde, en la sección Avanzado, puede especificar el número de columnas o filas.

how-to-split-columns-in-power-bi-7-1881092

Let me select the leftmost delimiter option and click OK

how-to-split-columns-in-power-bi-8-1752031

Now you can see that the employee IDs are separated from the original column and placed in the new column.

how-to-split-columns-in-power-bi-9-5371514

This time we select the Divide option at each occurrence of the delimiter option.

how-to-split-columns-in-power-bi-10-2869092

Now you can see that the text at each occurrence of the comma is separated from the original column and placed in a new column.

how-to-split-columns-in-power-bi-11-8850787

Déjame probar con otro delimitador. Para la demostración de Power BI Split Columns, seleccionamos la siguiente columna y dividimos esa columna usando el delimitador de espacio.

how-to-split-columns-in-power-bi-12-9254293

Now you can see the different columns that stored the split text at each occurrence of space.

how-to-split-columns-in-power-bi-13-3163758

Power BI split columns by number of characters

Haga clic con el botón derecho en la columna que desea dividir para abrir el menú contextual. Por favor seleccione el Split columns and then select the By number of characters option.

how-to-split-columns-in-power-bi-14-6472044

Select the By number of characters opens the Split column by number of characters window.

  • Number of characters: Specify the number of characters used to divide the column.
  • Once, as far to the left as possible: This option splits the leftmost string before the number of characters.
  • Once, as far to the right as possible: This option splits the rightmost string after the number of characters.
  • Repeatedly: The text is divided by every 5 characters.
how-to-split-columns-in-power-bi-15-5469775

You can now see the split columns in the Power BI query editor

how-to-split-columns-in-power-bi-16-7474796

Independientemente de los cambios que haya realizado (columnas divididas en Power BI), no afectarán hasta que presione Aplicar. Déjame golpear el Close and apply option under the Home tongue.

how-to-split-columns-in-power-bi-17-7411387

You can now see 11 columns within the Text Employees table.

how-to-split-columns-in-power-bi-18-2408815