Forum Discussion
Extract text between delimiters based on other column value (position)
Hello,
I need to extract a text between delimiter ( "," ) based on the second cloumn value. The text between delimiter may have any lenght.
The second column has the position value for the substring in the first column
Data:
I want to create a third column that should be:
Q2.7X2.7X0.4 (Second value from rci_optioncombo = position 1)
Não aplicável
NÃO
Não se aplica
Pêra Horizontal
I'm using Direct Query
I hope you guys can help me!
Thanks
Hi ThiagoDuarte ,
with DAX you can do it like this:
Extracted = PATHITEM(SUBSTITUTE(MIN('Table'[rc_optionscombo]),",","|"),MIN('Table'[rci_measured]))With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
3 Replies
- samdthompson
Memorable Member
Hello, this is best done in power query:
Home>>>Split Column>>>By Delimiter
- FrankAT
Community Champion
Hi ThiagoDuarte ,
with DAX you can do it like this:
Extracted = PATHITEM(SUBSTITUTE(MIN('Table'[rc_optionscombo]),",","|"),MIN('Table'[rci_measured]))With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)- ThiagoDuarte
Helper I
It worked!
I had to add a +1 after calling the second column to get it to work properly here
Extracted = PATHITEM(SUBSTITUTE(MIN('Table'[rc_optionscombo]),",","|"),MIN('Table'[rci_measured])+1)Thank you!