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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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