Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

partial match url using search function

hi all

i am trying to do a partial match of url,similar to vlookup in excel.
any idea how to do it in powerbi?

 

myurltable
urlsource
http://abc.com
http://www.search.zzz.com
www.global.mmm.com.au/about us

 

mydata 
urlDomain
abc.comABC
zzz.comZZZ
mmm.comMMM

 

any advice is appreciate. Thank you.

  • Hi,

    This calculated column formula in the url-list Table works

    Column = LOOKUPVALUE(urltable[Domain],urltable[url],FIRSTNONBLANK(FILTER(VALUES(urltable[url]),SEARCH(urltable[url],'url-list'[URL],1,0)),1))

    Hope this helps.

     

6 Replies

  • Hi Anonymous ,

     

    I am afraid I am not able to follow, if possible, can you please add a descriptive statement of what you are trying to achieve, expected result and current result ? that will help us help you faster.

    • Anonymous's avatar
      Anonymous
      Not applicable

      helassal 
      hi, i am trying to do similar to a vlookup in powerbi, can it return the value of "ABC" instead of "ZZZ"? 

      Thank you.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        This calculated column formula in the url-list Table works

        Column = LOOKUPVALUE(urltable[Domain],urltable[url],FIRSTNONBLANK(FILTER(VALUES(urltable[url]),SEARCH(urltable[url],'url-list'[URL],1,0)),1))

        Hope this helps.

         

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Anonymous 

     

    This is the sort of thing Power Query is very good at: extracting segments from strings using delimiters.

    Can' you do it in in Power Query?