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

laudrupin9

New Member
Joined
Nov 8, 2016
Messages
4
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.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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:
Code:
=[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]
 
Last edited:
Upvote 0
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:
Code:
=[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]


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

Forum statistics

Threads
1,214,872
Messages
6,122,026
Members
449,061
Latest member
TheRealJoaquin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top