Custom expression | Community
Skip to main content
AndyKent
Level 2
January 23, 2023
Solved

Custom expression

  • January 23, 2023
  • 1 reply
  • 1362 views

Hey all

 

I have a field on a custom form with 9 multiple choice answers. The formula only displays the value for 1 picked answer but obviously does not 'add' the total if more than 2 values are picked. Formula is as follows:

IF({DE:How are we measuring the success of this content?} = "All", 9,
IF({DE:How are we measuring the success of this content?} = "Organic traffic", 8,
IF({DE:How are we measuring the success of this content?} = "Organic rankings", 7,
IF({DE:How are we measuring the success of this content?} = "Organic visibility", 8,
IF({DE:How are we measuring the success of this content?} = "Conversions / CTA", 8,
IF({DE:How are we measuring the success of this content?} = "Improved user experience", 7,
IF({DE:How are we measuring the success of this content?} = "Links acquired", 6,
IF({DE:How are we measuring the success of this content?} = "Engagement", 7,
IF({DE:How are we measuring the success of this content?} = "None", 5, 0)))))))))

If anyone could advise/help with a 'SUM' expression that would give a total when more than 1 value is selected that would be great.

Thanks
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AndyKent

Thanks, in the meantime I've worked out this as the solution:

 

SUM(IF(CONTAINS("All", {DE:How are we measuring the success of this content?}),9,0),
IF(CONTAINS("Organic traffic", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Organic rankings", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("Organic visibility", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Conversions / CTA", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Improved user experience", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("Links acquired", {DE:How are we measuring the success of this content?}),6,0),
IF(CONTAINS("Engagement", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("None", {DE:How are we measuring the success of this content?}),5,0))

1 reply

Rafal_Bainie
Community Advisor
Community Advisor
January 23, 2023

I would recommend reviewing conversation around this idea:
https://experienceleaguecommunities.adobe.com/t5/workfront-ideas/fix-order-of-items-in-selected-in-multi-select-dropdown-when-in/idi-p/565728

@doug_den_hoed__atappstore has made great suggestion, which I think could resolve your problem. 

AndyKent
AndyKentAuthorAccepted solution
Level 2
January 23, 2023

Thanks, in the meantime I've worked out this as the solution:

 

SUM(IF(CONTAINS("All", {DE:How are we measuring the success of this content?}),9,0),
IF(CONTAINS("Organic traffic", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Organic rankings", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("Organic visibility", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Conversions / CTA", {DE:How are we measuring the success of this content?}),8,0),
IF(CONTAINS("Improved user experience", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("Links acquired", {DE:How are we measuring the success of this content?}),6,0),
IF(CONTAINS("Engagement", {DE:How are we measuring the success of this content?}),7,0),
IF(CONTAINS("None", {DE:How are we measuring the success of this content?}),5,0))
Dougplganger
Level 2
January 23, 2023

#aacgotcha01