Forum Discussion
Nueva columna copiar datos
Hola a todos.
Estoy trabajando con una consulta llamada "Conformacion ICO", en la cual busco crear una nueva columna que me tome el elemento resaltado en la columa "ICO" y me lo replique para todos los valores resaltados de la columna "Documento", he intentado con varios codigos pero no he obtenido el resultado esperado.
La columna salida "ID ICO" deberia verse de la siguiente manera.
Agradezco de cualquier ayuda para poder solventar este problema...Gracias!!
eduse07 ,
you can try this measure:
CorrectID = VAR currentDoc = MAX ( T[Doc] ) RETURN CALCULATE ( MAX ( T[ID] ), LEFT ( T[ID], LEN ( "03-0178" ) ) = "03-0178", T[Doc] = currentDoc, ALL ( T[Date] ) )If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
4 Replies
- ERD
Community Champion
What is the logic behind this? You need to choose values with name starting from "03-0178" for each Documento?
- eduse07
Helper I
yes, that is precisely what i must do
- ERD
Community Champion
eduse07 ,
you can try this measure:
CorrectID = VAR currentDoc = MAX ( T[Doc] ) RETURN CALCULATE ( MAX ( T[ID] ), LEFT ( T[ID], LEN ( "03-0178" ) ) = "03-0178", T[Doc] = currentDoc, ALL ( T[Date] ) )If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.