Forum Discussion
fgonzalez
5 years agoNew Member
PROBLEMS WHEN CREATING A NEW TABLE
I am occupying Power BI Desktop and creating a new table. Take DAX, "Union" and "AllSelected" functions from an existing data table. OC Tabla = (UNION (ALLSELECT...
- 5 years ago
Hi fgonzalez ,
Using below dax expression instead:
Table 2 = UNION ( SELECTCOLUMNS ( 'Table', "obra", 'Table'[Obra], "Numero OC2", 'Table'[Numero OC2], "Proveedores", 'Table'[Proveedores], "Recurso", 'Table'[Recurso 1], "Unidad", 'Table'[Unidad 1], "Cant", 'Table'[Cant.1], "Precio", 'Table'[Precio1] ), SELECTCOLUMNS ( 'Table', "obra", 'Table'[Obra], "Numero OC2", 'Table'[Numero OC2], "Proveedores", 'Table'[Proveedores], "Recurso", 'Table'[Recurso 2], "Unidad", 'Table'[Unidad 2], "Cant", 'Table'[Cant.2], "Precio", 'Table'[Precio 2] ) )And you will see:
For my sample .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
fgonzalez
5 years agoNew Member
v-kelly-msft
Community Support
5 years agoHi fgonzalez ,
Using below dax expression instead:
Table 2 =
UNION (
SELECTCOLUMNS (
'Table',
"obra", 'Table'[Obra],
"Numero OC2", 'Table'[Numero OC2],
"Proveedores", 'Table'[Proveedores],
"Recurso", 'Table'[Recurso 1],
"Unidad", 'Table'[Unidad 1],
"Cant", 'Table'[Cant.1],
"Precio", 'Table'[Precio1]
),
SELECTCOLUMNS (
'Table',
"obra", 'Table'[Obra],
"Numero OC2", 'Table'[Numero OC2],
"Proveedores", 'Table'[Proveedores],
"Recurso", 'Table'[Recurso 2],
"Unidad", 'Table'[Unidad 2],
"Cant", 'Table'[Cant.2],
"Precio", 'Table'[Precio 2]
)
)
And you will see:
For my sample .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
- fgonzalez5 years agoNew Member
Hi v-kelly-msft
Thank you so much