Forum Discussion
Extract string from collumn to a new collumn
Hello Community,
I am trying to convert an excel function to Power BI. Excel is good, but i need Power BI to automate some stuff.
In excel the function is text.before and text.after (appeared in last version of office 365)
So, here is the content of a single column :
[<Company-PEPSI>, <Backup-No_backup>, <Rubrik-GOLD>, <Environnement-Production>, <Datacenter-NorthEurope>]
I would like to populate 3 new column named "Company","Environnement","Datacenter"
The string can be populated by different order:
[<Company-PEPSI>, <Backup-No_backup>, <Rubrik-GOLD>, <Environnement-Production>, <Datacenter-NorthEurope>]
[<Rubrik-GOLD>,<Company-PEPSI>, <Backup-No_backup>, <Environnement-Production>, <Datacenter-NorthEurope>]
[<Datacenter-NorthEurope>,<Rubrik-GOLD>,<Company-PEPSI>, <Backup-No_backup>, <Environnement-Production>]
I tried with SEARCH and LEFT/RIGHT function, but no success
application =
LEFT(
'VM'[vSphere Tag],
SEARCH(
"<Application-",
'VM'[vSphere Tag],
,
SEARCH(
">",
'VM'[vSphere Tag],
LEN('VM'[vSphere Tag])
)
))
YEAH that's right.
I found the solution by using, in the transform data GUI, the add collumn function and then extract text before and after.
Thats the same function that has been implemented in excel. I was looking for it in PBI but i didn't look at the right place
2 Replies
- freginierSolution Sage
Instead of search try to split then you should have your 3 columns.. it's difficult to help without pbix file
______________________________________________________
If you found this post helpful, please give Kudos C
- fabdHelper I
YEAH that's right.
I found the solution by using, in the transform data GUI, the add collumn function and then extract text before and after.
Thats the same function that has been implemented in excel. I was looking for it in PBI but i didn't look at the right place