Forum Discussion
Anonymous
2 years agoNot applicable
Can't subtract
I just want the characters to the right of the word Breaker in one column (variable number to the left). If there is an easier way, let me know. I got close, but I want to subtract 7 from the number of charaters in the RIGHT formula so it also removes "reaker". However if I subtract in either the Char or GS_sec_dis column, it throws an error. I tried making it text and moving it around, but it keeps throwing an error.
GE_sec_dis = if(and('Maximo Data'[manufacturer]="GENERAL ELECTRIC", 'Maximo Data'[classstructure_classificationid]="CB"), right('Maximo Data'[description], 'Maximo Data'[Char]),blank())
GE_sec_dis = if(and('Maximo Data'[manufacturer]="GENERAL ELECTRIC", 'Maximo Data'[classstructure_classificationid]="CB"), right('Maximo Data'[description], 'Maximo Data'[Char]-7),blank())
Oh, yeah. Way easier in Power Query. Just split column by delimiter, custom delimiter, " breaker "
5 Replies
- CoreyP
Solution Sage
Might be better in Power Query? Split string after "breaker " then extract characters? I'm not totally clear what you want your output to be.
- AnonymousNot applicable
I hace a column that looks like this. I want just the stuff after "breaker " in a different column.
xyz breaker 12a b34
wxzd breaker 3 24cd skl
jfdkla breaker q u o 24
Output
12a b34
3 24cd skl
q u o 24
- CoreyP
Solution Sage
Oh, yeah. Way easier in Power Query. Just split column by delimiter, custom delimiter, " breaker "
- vicky_
Super User
Characters to Right = RIGHT('Table'[Column1], LEN('Table'[Column1]) - FIND("Breaker ", 'Table'[Column1], 1, 1) - 7)You can use the FIND or SEARCH functions to find the "Breaker" keyword instead of using the char column (but both should still work fine).
- AnonymousNot applicable
Sorry, should have added what Char is
Char = len('Maximo Data'[description])-(SEARCH("breaker",'Maximo Data'[description],1,blank()))When I make it this, it throws an error in the GE_Sec_dis column.Char = len('Maximo Data'[description])-(SEARCH("breaker",'Maximo Data'[description],1,blank()))-7When I tried to make it all one formula, it threw error. I thought it was the search and len together, but looks like it was the -7 part.If I try adding another column, char2 = 'Maximo Data'[Char]-7and changing reference to char2,GE_sec_dis = if(and('Maximo Data'[manufacturer]="GENERAL ELECTRIC", 'Maximo Data'[classstructure_classificationid]="CB"), right('Maximo Data'[description], 'Maximo Data'[char2]),blank())I get this error