Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable in a part of set analysis?

Hi

I'm using this expression

=sum ({<KeyFecha=, FECHA_CERTIFICACION = {"$(= '>=' & $(vFechaFinalFormato)  & '<=' & $(vFechaInicialFormato))"}>} MONTO_USD_MIL)

Now i wanna use this set analysis in 80 or 100 expressions

{<KeyFecha=, FECHA_CERTIFICACION = {"$(= '>=' & $(vFechaFinalFormato)  & '<=' & $(vFechaInicialFormato))"}>}

Can i put this in a variable? because if in the future i have to change i'll have to copy and paste a lot..

greetings

1 Solution

Accepted Solutions
sunny_talwar

Never tried it, but I think it should work.

UPDATE: Seems to be working in the below sample

Capture.PNG

View solution in original post

4 Replies
sunny_talwar

You should be able to do this without any issue. The only concern is that if one of the expression needs to have an extra set analysis condition, you won't be able to add a variable + add an extra condition. You will then need to remove the variable and add the whole set analysis statement with the additional condition into your expression.

Note: Expression Editor may show that there is syntax error, but it should work fine.

Not applicable
Author

You're right but maybe can i do something like this

vVariable = FECHA_CERTIFICACION = {"$(= '>=' & $(vFechaFinalFormato)  & '<=' & $(vFechaInicialFormato))"}

Expression =sum ({<KeyFecha=, $(vVariable)>} MONTO_USD_MIL)

is that gonna work ?

sunny_talwar

Never tried it, but I think it should work.

UPDATE: Seems to be working in the below sample

Capture.PNG

Not applicable
Author

Yes it´s working

Regards