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

Re: Concatenar nombre de columna + valor de celda

Hola Greg,

Gracias por la sugerencia de despivoar las columnas, funcionó como un encanto!

ixdutt

Highlighted
Helper II
Helper II

Re: Concatenar nombre de columna + valor de celda

@Greg_Deckler ,

 

Thanks for the suggestion! I used your suggestion to unpivot the columns to align them in 2 columns only. I also took the extra steps of creating additional columns per account category and aggregate the table so place all of the account listings on to one line. 

Cap WO DCCCap WO DCC2Cap WO MCCCap WO MCC2Exp WOExp WO SecondaryExp WO DCCExp WO Cap MCCCap\Exp Acct
Cap WO DCC 1001 Cap WO MCC 1003 Exp WO 2001   Cap WO DCC 1001 Cap WO MCC 1003 Exp WO 2001

 

Cap\Exp Acct = [Cap WO DCC]&" "&[Cap WO DCC2]&" "&[Cap WO MCC]&" "&[Cap WO MCC2]&" "&[Exp WO]&" "&[Exp WO Secondary]&" "&[Exp WO DCC]&" "&[Exp WO Cap MCC]

 

The end result is:

Cap WO DCC 1001 Cap WO MCC 1003 Exp WO 2001

 

I've been asked to add a carriage break to seperate each account listing, so I added UNICHAR(10) in place of the " " in the code above, however it is creating spaces between the listed accounts. I'm looking for a way to list the accounts and avoid the breaks if one of the column values is BLANK.

 

Any ideas?

Highlighted
Super User IV
Super User IV

Re: Concatenar nombre de columna + valor de celda

@ixdutt Fantastic!! Hmm, line breaks, I recall that the UNICODE route was the way to go but will have to research, any chance you can post an screen shot of what you are seeing?


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

@ 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: Concatenar nombre de columna + valor de celda

@Greg_Deckler,

Gracias por la respuesta. Así que mi conjunto de datos tiene este aspecto:

Nombre del proyectoCap WO DCCCap WO DCC2Cap WO MCCCap WO MCC2Exp WOExplosivo WO SecundarioExp WO Cap MCC
Alfa-OmegaTapa WO DCC 3528 Cap WO MCC 375Cap WO MCC2 1515 Secundaria Exp WO 3185

A partir de ahí agredo el código para concatenar las columnas:

Captial - Cuenta de gastos - [Cap WO DCC]&UNICHAR(10)&[Cap WO DCC2]&UNICHAR(10)&[Cap WO MCC]&UNICHAR(10)&;[Cap WO MCC2]&UNICHAR(10)&[Exp WO]&UNICHAR(10)&[Exp WO Secondary]&UNICHAR(10)&[Exp WO Cap MCC]

Mi resultado es el siguiente:

Tapa WO DCC 3528

Cap WO MCC 375

Cap WO MCC2 1515

Secundaria Exp WO 3185

Estoy tratando de encontrar una manera de eliminar los espacios en blanco entre las pausas del carro.

ixdutt

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors