Expand my Community achievements bar.

SOLVED

Custom expression

Avatar

Level 3

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
1 Accepted Solution

Avatar

Correct answer by
Level 3

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))

View solution in original post

5 Replies

Avatar

Community Advisor

I would recommend reviewing conversation around this idea:
https://experienceleaguecommunities.adobe.com/t5/workfront-ideas/fix-order-of-items-in-selected-in-m...

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

Avatar

Correct answer by
Level 3

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))

Avatar

Community Advisor

 

Very nice @AndyKent: your "SUM(IF(CONTAINS(...)))" solution to add up multi-selected values is how I was going to suggest you solve it, too.

 

And @Rafal_Bainie, thanks for the tag; yesterday, I made some improvements to that how to sort multi-selected values technique, which I'll update under that related thread.

 

Regards,

Doug

Avatar

Community Advisor

I was going to answer with the same thing, @AndyKent. If(CONTAINS( is the way to go! I use this in a report of mine too.

If this helped you, please mark correct to help others : )