Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select one value from a string of multiple values

Hi everybody,

Please help with this expression-

=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.

Please Help. *****URGENT****

1 Reply
sunny_talwar

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)