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

Multiple if statements in one calc column

Hi All,

 

I am tring to execute a multiple if statement in one calc column but it didnt work,

So I am tring to implement a switch statement but niether wont work.

 

SupplierHecPollNL =  IF(Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ;"Papendrecht_HecPoll";Tankingen[Leverancier]);
(IF(Tankingen[Land] = "Netherlands" && Tankingen[Leverancier] = "HecPoll"; "Papendrecht_HecPoll";Tankingen[Leverancier])
 
Can somenone help please?
 
Regards,
Ezz

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

you gave completely the same sentence written twice.

use only this

SupplierHecPollNL =  IF(Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ;"Papendrecht_HecPoll";Tankingen[Leverancier])

or use SWITCH()

SupplierHecPollNL =  
SWITCH(TRUE();
Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ; "Papendrecht_HecPoll";
Tankingen[Land]="Other" && Tankingen[Leverancier]="Other" ; "Otehr Value";
Tankingen[Leverancier]
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , you first if

IF(Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ;"Papendrecht_HecPoll";Tankingen[Leverancier])

 

HAs ended here. after that is just repeat.

If you need to loop if

IF(Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ;<If here>;<If here>)

 

Or use Switch True

 

Switch(True(),

<condition>, <action>,

<condition>, <action>,

<condition>, <action>,

<else action>

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
nandukrishnavs
Community Champion
Community Champion

@Anonymous 

Try this

 

SupplierHecPollNL =
IF (
    Tankingen[Land] = "Netherlands"
        && Tankingen[Leverancier] = "HecPoll";
    "Papendrecht_HecPoll";
    IF (
        Tankingen[Land] = "Netherlands"
            && Tankingen[Leverancier] = "Replace with another value";
        "Papendrecht_Replace with another value";
        Tankingen[Leverancier]
    )
)

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

az38
Community Champion
Community Champion

Hi @Anonymous 

you gave completely the same sentence written twice.

use only this

SupplierHecPollNL =  IF(Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ;"Papendrecht_HecPoll";Tankingen[Leverancier])

or use SWITCH()

SupplierHecPollNL =  
SWITCH(TRUE();
Tankingen[Land]="Netherlands" && Tankingen[Leverancier]="HecPoll" ; "Papendrecht_HecPoll";
Tankingen[Land]="Other" && Tankingen[Leverancier]="Other" ; "Otehr Value";
Tankingen[Leverancier]
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.