Forum Discussion
Karthikgayathri
3 years agoHelper I
undefined
rubayatyasmin i need output as text without the bracket ex : Head Office I used to write the code Right ( dim( customer) , search("(" , dim( customer) 1, len ( dim( customer )+1)-1) ...
rubayatyasmin
3 years agoCommunity Champion
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 .
- Karthikgayathri3 years agoHelper I
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 ))