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

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

Reply
mmh
Helper I
Helper I

Swithc function with NOT operator

HI, I have following calculated column with switch function where last part with NOT operator giving incorrect result. Any suggestion !
 
Contract_details =
SWITCH(
    true(),
    accountContract[ContractType_Id] IN {896,3430}  &&  AccountContract[status_Id]IN {566,2664,100246},"FCL_Contracts",
    accountContract[ContractType_Id] IN {895,1398}  &&  AccountContract[status_Id]IN {566,2664,100246},"Rental_Contracts",
    Not (AccountContract[status_Id] IN {565,567,1295}), "total_Contract", --  this part generating  wrong result
    "Unknown"
)
 
Thank You!
BR
mmh
1 ACCEPTED SOLUTION
latimeria
Solution Specialist
Solution Specialist

Hi @mmh ,

Switch function stop evaluating when a condition is met. So , if contract 566 => fcl_contract and it will never be included in total_contract.

View solution in original post

1 REPLY 1
latimeria
Solution Specialist
Solution Specialist

Hi @mmh ,

Switch function stop evaluating when a condition is met. So , if contract 566 => fcl_contract and it will never be included in total_contract.

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.