Forum Discussion
undefined
Use MID func.
=MID([ColumnName], FIND("(", [ColumnName], 1, LEN([ColumnName]), 0) + 1,
FIND(")", [ColumnName], 1, LEN([ColumnName]), 0) - FIND("(", [ColumnName], 1, LEN([ColumnName]), 0) - 1)
replace col name with actual column name .
Instead of 0 only u used len function then again using 0 how u used 0 ?
- rubayatyasmin3 years agoCommunity Champion
Here is the explanation of the formula:
- FIND("(", [ColumnName], 1, LEN([ColumnName]), 0) + 1 - It finds the first character after the opening bracket.
- FIND(")", [ColumnName], 1, LEN([ColumnName]), 0) - FIND("(", [ColumnName], 1, LEN([ColumnName]), 0) - 1 - It calculates the number of characters to extract.
- MID([ColumnName], ..., ...) - This function will then extract the required number of characters starting from the specified position.
Also, know the details of the Find function.
refer: https://learn.microsoft.com/en-us/dax/find-function-dax
- Karthikgayathri3 years agoHelper I
Bro for find function only 4 input but u extra added 0 also .find ("(", column name , 1 ( starting position), len ( not found value ))
- rubayatyasmin3 years agoCommunity Champion
0 - not found value,
try using this code without LEN func and not_found_value param.
note: the following code assumes you have brackets in all the rows.
MID([ColumnName],
FIND("(", [ColumnName]) + 1,
FIND(")", [ColumnName]) - FIND("(", [ColumnName]) - 1)MID([ColumnName], start_position, num_characters): MID function returns a string of characters from the middle of a text string, given a starting position and length. Here, the starting position and length are determined by the other two parts of the expression.
- Karthikgayathri3 years agoHelper I
in my above code wht is the error bro . output showing head office crtly but N/A only showing A alone not showing N/A any error in my code plz tell