# Failed to resolve name 'char'. It is not a valid table or function name.



## laudrupin9 (Nov 16, 2016)

Hello

I hope you can help me:

Here my fonction used in the power pivot table: 

=MID([DisplayName];FIND(CHAR(40);[DisplayName])+1;FIND(CHAR(41);[DisplayName])-FIND(CHAR(40);[DisplayName])-1)


Display Name

AAPP(Pedro)
AAPP(David)
AAPP(Juan Pablo).
AAPP(Maria Jose Pardo)


The target of my formula is to get this result:

Display Name

Pedro
David
Juan Pablo
Maria Jose Pardo


If i use this function in a classic "sheet" , the fuction is working fine, but this is not working in my powerpivot table.

Who can help me? 

Thanks in advance.


----------



## MarcelBeug (Nov 16, 2016)

These kind of operations should preferably be done with Power Query, not with DAX. DAX has no CHAR function.

Anyhow, in DAX you can try:

```
=[SIZE=3][COLOR=#0000ff][SIZE=3][COLOR=#0000ff]MID[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3]([DisplayName];[/SIZE][SIZE=3][COLOR=#0000ff][SIZE=3][COLOR=#0000ff]FIND[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3]([/SIZE][SIZE=3][COLOR=#a31515][SIZE=3][COLOR=#a31515]"("[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3];[DisplayName])+1;[/SIZE][SIZE=3][COLOR=#0000ff][SIZE=3][COLOR=#0000ff]FIND[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3]([/SIZE][SIZE=3][COLOR=#a31515][SIZE=3][COLOR=#a31515]")"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3];[DisplayName])-[/SIZE][SIZE=3][COLOR=#0000ff][SIZE=3][COLOR=#0000ff]FIND[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3]([/SIZE][SIZE=3][COLOR=#a31515][SIZE=3][COLOR=#a31515]"("[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=3];[DisplayName])-1)[/SIZE]
```


----------



## laudrupin9 (Nov 16, 2016)

MarcelBeug said:


> These kind of operations should preferably be done with Power Query, not with DAX. DAX has no CHAR function.
> 
> Anyhow, in DAX you can try:
> 
> ...




Yes, I agree with you. Thanks for your help. Is working fine . This topic can be Closed.


----------

