Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in set modifier ad hoc element list: ',' or ')' expected

Hye,

I define a variable :

Set VSecondeTranche =only(if(aggr(Rank(

Count(if ( $(vAnnee) = ANNEE_FH and $(vTypeAnnee) = TYPE_ANNEE ,Revenu_T1))

        /

    Count(Total if ( $(vAnnee) = ANNEE_FH and $(vTypeAnnee) = TYPE_ANNEE ,Revenu_T1))

        ,Revenu_T1)

        ,Revenu_T1)=2,Revenu_T1

            )

        );

That works fine when i put $(VSecondeTranche) (only 1 value).

But when i try

sum(

      {$<Revenu_T1 = {'=$(VSecondeTranche) '}

              >} MNT_NET_COJ_TOT

          )

I've the error message.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

What if you do this

Sum({$<Revenu_T1 = {"$(=$(VSecondeTranche))"}>} MNT_NET_COJ_TOT)

View solution in original post

9 Replies
YoussefBelloum
Champion
Champion

Hi,

try this:

sum({$<Revenu_T1 = {$(VSecondeTranche)}>} MNT_NET_COJ_TOT)

Anonymous
Not applicable
Author

same error...

sunny_talwar

How about this?

Sum({$<Revenu_T1 = {"$(=VSecondeTranche)"}>} MNT_NET_COJ_TOT)

Anonymous
Not applicable
Author

no error, but it give me 0

for information, it's a title, i set

$(VSecondeTranche) & '____' &

Sum({$<Revenu_T1 = {"$(=VSecondeTranche)"}>} MNT_NET_COJ_TOT)


and it's return

Capture.PNG


sunny_talwar

What if you do this

Sum({$<Revenu_T1 = {"$(=$(VSecondeTranche))"}>} MNT_NET_COJ_TOT)

Anonymous
Not applicable
Author

seems to be good !!

thanks !

Can you just explain why double quote and double $ ?

sunny_talwar

It depends on how the variable is declared, I am guessing your variable is without the equal sign? It just needed to be expanded, before the set analysis's dollar sign expansion. I am not completely sure if there is a sure shot way to decide this, but I usually try these two with variable and more often then not then work

1) {<FieldName = {"$(=vVar)"}>}

2) {<FieldName = {"$(=$(vVar))"}>}

Anonymous
Not applicable
Author

ok thanks.

my variable was defines like this :

Set VSecondeTranche = ......


I'll try this next time too !!


Edit : i think i've understand. It's about the same than difference betwenn set and let in load i gess.

Anonymous
Not applicable
Author

I'm getting a similar error with the following expression that aims to pull in a current AnnualProduct field selection that might include the "&" or "-" sign.  It works when I select an option without one of those symbols.  Any idea how to fix this?

(SUM({<AnnualYear={'$(=GetFieldSelections(AnnualYear))'},AnnualProduct={'$(=GetFieldSelections(AnnualProduct))'}>} AnnualSalesPremiumCurrentYear))