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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

3 IF functions with similar condition

Hello Team,

 

Hope everyone is safe and healthy.

 

I am looking for help with IF function. I need to create a column where the information from exieting column needs to be modified. I am using the below formula. 

 

Risk SBU = IF(SCARs[SBU 2]="W&P Water & Pro","WATER & PRO",(IF(SCARs[SBU 2]="M&M Mobility & Man","MOBILITY & MAN",(IF(SCARs[SBU 2]="E&I Electric & Industry","ELECTRIC & INDUSTRY", "0","1","2")))))
 
But it gives error stating "Too many arguments were passed to the IF function. The maximum argument count for the function is 3." Can someone please help.
 
Thank you in advance !
 
Regards,
Smriti 
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

Risk SBU =
IF (
    'SCARs'[SBU 2] = "W&P Water & Pro",
    "WATER & PRO",
    IF (
        'SCARs'[SBU 2] = "M&M Mobility & Man",
        "MOBILITY & MAN",
        IF ( 'SCARs'[SBU 2] = "E&I Electric & Industry", "ELECTRIC & INDUSTRY", "0" )
    )
)

 

Also, use SWITCH instead. Way cleaner.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

Risk SBU =
IF (
    'SCARs'[SBU 2] = "W&P Water & Pro",
    "WATER & PRO",
    IF (
        'SCARs'[SBU 2] = "M&M Mobility & Man",
        "MOBILITY & MAN",
        IF ( 'SCARs'[SBU 2] = "E&I Electric & Industry", "ELECTRIC & INDUSTRY", "0" )
    )
)

 

Also, use SWITCH instead. Way cleaner.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (25)