I need the below excel formula in POWER BI QUERY
Can anyone help ?
It seems there're two ways. First, you need to use M Language in Advanced Editor. You may refer to this post. Second, you may create a calculate column with Search Function. Show a sample as below:
MAX ( Country[Country] ),
FILTER ( Country, SEARCH ( Country[Phone], Number[Number], 1, 0 ) )
Thanks for your Reply. I tried using the Formula mentioned in your reply. In some cases i am getting wrong output.
For Example the Number was "914842531599" and the result i got was "599" instead of 91.
My Result should be always from the First digit and it should NOT be matching from middle of Number.
Note : my Phone list had all the number starting with 91XXX and 91. There was NO Phone number list with 914XX.
You may have a look at Search Function. The Parameters 'start_num' of this function will be the mumber which you want to start researching.
MAX ( Table1[Name] ),
FILTER ( Table1, SEARCH ( Table1[String], Table2[Number], 1, 0 ) )
If it is not your case, please share some data sample and expected output.
Click here to read more about the December 2021 Updates!
Mark your calendars and join us for our next Power BI Dev Camp!
Learn how to create your own user groups today!