Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Loic_Pedro_Hans
Regular Visitor

problem with text functions

Hi,

 

I try to buid a simple formula to extract the first name

Loic_Pedro_Hans_0-1694607482591.png

 

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.
1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @Loic_Pedro_Hans 

What about like below?  

 

Sakiko_9-1694608896741.png

 

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @Loic_Pedro_Hans 

What about like below?  

 

Sakiko_9-1694608896741.png

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.