1 Reply Latest reply: Oct 21, 2015 11:55 AM by Sunny Talwar

# Select one value from a string of multiple values

Hi everybody,

=Concat({

< CAL_DT = {'>=\$(=Date(\$(vGSstartR13W)))<=\$(=Date(vGSEndDate))'},

GEO_SK=p(GEO_SK),

ATVY_GEO_SK =p(GEO_SK),

BRAND=p({GS}PROD_LIST),

TGT_CALL_PLAN={'Y'},

PRES_ALGN={\$(=vALGN1)},CALL_ID={'*'}-{''}>} distinct ATVY_GEO_SK,'-')

This expression gives me result as 192-145-167.

whereas

=sum({

< CAL_DT = {'>=\$(=Date(\$(vGSstartR13W)))<=\$(=Date(vGSEndDate))'},

GEO_SK=p(GEO_SK),

ATVY_GEO_SK =p(GEO_SK),

BRAND=p({GS}PROD_LIST),

TGT_CALL_PLAN={'Y'},

PRES_ALGN={\$(=vALGN1)},CALL_ID={'*'}-{''}>} distinct ATVY_GEO_SK)

And this expression gives me the value 504 (Sum of all three)

But I want only 192 to be displayed.

• ###### Re: Select one value from a string of multiple values

May be this:

=SubField(

Concat({

< CAL_DT = {'>=\$(=Date(\$(vGSstartR13W)))<=\$(=Date(vGSEndDate))'},

GEO_SK=p(GEO_SK),

ATVY_GEO_SK =p(GEO_SK),

BRAND=p({GS}PROD_LIST),

TGT_CALL_PLAN={'Y'},

PRES_ALGN={\$(=vALGN1)},CALL_ID={'*'}-{''}>} distinct ATVY_GEO_SK,'-'), '-', 1)