Forum Discussion
mmh
3 years agoHelper 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
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.