cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

devolver la tabla de dos comandos selectcolumn utilizando el constructor de la tabla

Hello experts

 

I have a requirement to combine every 2 columns of a table and then display the concatenated columns in a saperate table.

 

I am able to cross join and concatenate the result of the columns, but I cannot display the concatenated columns in a single table as the final result. At one point I can show only one column.

 

Code;

 

Table 2 =
Var col1 - SELECTCOLUMNS (Sheet2, "col1", Sheet2 [Test1])
Var col2 - SELECTCOLUMNS (Sheet2, "col2", Sheet2 [Test2])
var col3 - CROSSJOIN (col1, col2)
Var col4 - SELECTCOLUMNS (Sheet2, "col4", Sheet2 [Test2])
Var col5 - SELECTCOLUMNS (Sheet2, "col5", Sheet2 [Test3])
var col6 - CROSSJOIN (col4, col5)
Var col7 - SELECTCOLUMNS (Sheet2, "col7", Sheet2 [Test3])
Var col8 - SELECTCOLUMNS (Sheet2, "col8", Sheet2 [test4])
var col9 - CROSSJOIN (col7, col8)
var col10 - CONCATENATE (col4, col5)
return
SELECTCOLUMNS (ADDCOLUMNS (col6, "Concatcol", COMBINEVALUES (",", [col4], [col5])), "c1", [Concatcol])
 
Col3, Col6 and Col9 are the cross join columns now in the return code I have added for Col6, in the same way that I need to add col3 and Col9 and show all 3 columns in the calculated table.
 
Expected production
 
SELECTCOLUMNS (ADDCOLUMNS (col6, "Concatcol", COMBINEVALUES (",", [col4], [col5])), "c1", [Concatcol]),
SELECTCOLUMNS (ADDCOLUMNS (col3, "Concatcol1", COMBINEVALUES (",", [col1], [col2])), "c2", [Concatcol1])
 
I hope its a way, but I am a beginner in Power BI.
 
Sample data
 
Test1Test2Test3test4
oneoneJobsone
oneoneWorks1one
onetwoJobs2one
one3Jobs3two
one3Jobs4one
one4Jobs5one
 
Output I got
 

 

In the above image there is a column with the cross join and concatenation of Test2 and Test3, My requirement is to add 2 more columns with the concatenation of Test1 and Test2 and the concatenation of Test3 and Test4

 

Thank you
If you
4 REPLIES 4
Highlighted
Super User IX
Super User IX

Re: devolver la tabla de dos comandos selectcolumn utilizando el constructor de la tabla

@siva_powerbi Lo sentimos, teniendo problemas para seguir, ¿puede publicar datos de ejemplo como texto y salida esperada?

No es realmente suficiente información para seguir adelante, por favor primero compruebe si su problema es un problema común enumerado aquí: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Además, consulte este post sobre cómo obtener respuesta a su pregunta rápidamente: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Las partes más importantes son:
1. Datos de muestra como texto, utilice la herramienta de tabla en la barra de edición
2. Salida esperada de los datos de muestra
3. Explicación en palabras de cómo obtener de 1. a 2.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Helper II
Helper II

Re: devolver la tabla de dos comandos selectcolumn utilizando el constructor de la tabla

Señor, acabo de actualizar la pregunta, Por favor, consulte y consejo.

Highlighted
Super User IX
Super User IX

Re: devolver la tabla de dos comandos selectcolumn utilizando el constructor de la tabla

@siva_powerbi, demasiadas uniones cruzadas. Por favor, háganos saber lo que está tratando de lograr.

¿Puede compartir datos de ejemplo y salida de ejemplo en formato de tabla? O una muestra de pbix después de eliminar datos confidenciales.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper II
Helper II

Re: devolver la tabla de dos comandos selectcolumn utilizando el constructor de la tabla

I have added the sample data in the question, it is the data I am working on.

 

My requirement is to out of 4 columns.

 

Make cross join of col1, col2 and col2,col3 and col3,col4

 

Then concatenate cross joins with "," and show the resultant values in a table side by side.

 

I tried to attach the file but it doesn't carry the data in datasource, May I know the exact process.

 

Thanks

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors