Forum Discussion
Tesy
Helper I
1 year agoFunción MID
Hola comunidad, Estoy tratando de crear esta formula que tengo en excel al Power BI =VALUE ( MID ( W2 , SEARCH ( "Horas de participación" , W2 ) + 26 , SEARCH ( ";Evaluación global", W2 ) - SEAR...
- Anonymous1 year ago
Hi, Tesy
You can try the following methods.
Horas = VAR HorasPos = IFERROR(SEARCH("Horas de participación", 'Table'[COLUMNNAME]), 0) VAR EvalPos = IFERROR(SEARCH(";Evaluación global", 'Table'[COLUMNNAME]), 0) VAR IsPatternFound = (HorasPos > 0) && (EvalPos > HorasPos + 26) VAR ExtractedText = IF( IsPatternFound, MID('Table'[COLUMNNAME], HorasPos + 26, EvalPos - (HorasPos + 26)), BLANK() ) RETURN IF(IsPatternFound, VALUE(ExtractedText), BLANK())Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ryan_mayu
Super User
1 year agoyou can try to create a column
=MID ( [COLUMNNAME], SEARCH ( "Horas de participación" , [COLUMNNAME]) + 26 , SEARCH ( ";Evaluación global", [COLUMNNAME]) - SEARCH ("Horas de participación" , [COLUMNNAME]) - 26 )
if this does not work, pls provide the error message or provide some sample data and expected output
- ryan_mayu1 year ago
Super User
you add the third parameter in the search function which is like SEARCH (xxx,xxx, 0)
https://learn.microsoft.com/en-us/dax/search-function-dax?wt.mc_id=DP-MVP-5004616