Forum Discussion
Loic_Pedro_Hans
2 years agoRegular Visitor
problem with text functions
Hi,
I try to buid a simple formula to extract the first name
My formula is :
Prenom =
VAR Pos_Virgule = IFERROR (FIND(",",Customer[Name]), BLANK() )
VAR Taille = LEN( 'Customer'[Name])
IF (
NOT ISBLANK(Pos_Virgule),
VAR Prenom = LEFT( 'Customer'[Name], Taille - Pos_Virgule),
VAR Prenom = 'Customer'[Name]
)
RETURN Prenom
There is an error : La syntaxe de « IF » est incorrecte.
can you help me please.
Thanks.
2 Replies
- DataNinja777Super User
- Loic_Pedro_HansRegular Visitor
Thanks Sakiko !!
I see my error
Prenom =VAR Pos_virgule = IFERROR (FIND(",",Customer[Name]), BLANK() )VAR Taille = LEN( 'Customer'[Name])VAR Mon_Prenom =IF (NOT ISBLANK(Pos_Virgule),LEFT( 'Customer'[Name], Taille - Pos_virgule),'Customer'[Name])Return Mon_Prenom