Forum Discussion
Extract URL of hyperlink text - Suggestions
Hi Wise1,
Take this link https://www.extendoffice.com/documents/excel/859-excel-list-hyperlinks.htm as an example, your expect result is displaying "www.extendoffice.com" and "extendoffice" in two new columns, right?
Below is my test. I created a table named "URL" containing one column [ColumnData]. Then, I created two calculated columns based on [ColumnData].
URLData =
MID (
'URL'[ColumnData],
FIND ( "http://", 'URL'[ColumnData] ) + 7,
FIND (
"/",
MID (
'URL'[ColumnData],
FIND ( "http://", 'URL'[ColumnData] ) + 7,
LEN ( 'URL'[ColumnData] ) - 7
)
)
- 1
)
URLName =
MID (
MID (
'URL'[URLData],
FIND ( ".", 'URL'[URLData], 1 ) + 1,
LEN ( 'URL'[URLData] ) - FIND ( ".", 'URL'[URLData], 1 )
),
1,
FIND (
".",
MID (
'URL'[URLData],
FIND ( ".", 'URL'[URLData], 1 ) + 1,
LEN ( 'URL'[URLData] ) - FIND ( ".", 'URL'[URLData], 1 )
),
1
)
- 1
)
Alternatively, you can directly split this column into multiple columns then delete unnecessary columns. Go to Editor>Transform>Split Column>By Delimiter>Custom>"/". Reference: Extract url from text in DAX
Thanks,
Yuliana Gu
Sorry i have not written back yet, i have been under the pump with Xmas coming up
- Thanks for taking the time to reply
i will have a look at this as soon as i can and let you know!
Thanks again for all the pointers and info and i will let you know asap !