I want to add a calculated (currency) field to my custom form that calculates a sum value based on the options selected in the multi-select field.
SUM(IF(Field A multiselect="NL 01",25,IF(Field A multiselect="NL 02",50,0)))
When I select one option, the calculation works. However, when I select multiple options, the calculation fails.
Does anyone have an idea how to solve this riddle ;)?
Topics help categorize Community content and increase your ability to discover relevant content.
I think probably consult the help article for calculated data expressions ( https://one.workfront.com/s/document-item?bundleId=the-new-workfront-experience&topicId=Content%2FRe... ) and see if you can find some other commands to help achieve this (maybe "if contains" rather than a straight-up "if"? -- a field with multiple options selected feels like more of a "contains" than an "equals" ... in my mind, anyway)
Also, not that you asked, I confess I'm not the best at calculated expressions, but something about your calculation definitely looks a bit wonky. To me, it's saying "if field A is equal to NL 01, then the value is 25, OTHERWISE if field A is NL 02 then the value is 50 and if it's not NL 02, the value is 0." So to me it feels like there's no actual addition going on. Maybe if you play around with different combinations of parentheses I'll feel differently.