Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using variable in Set Expression

Hi all, I'm trying to create the following expression which contains a variable but I'm getting syntax error

Sum({$<Fecha = {"<=Today()-"$(vNumDias)}> Ventas)

What is the correct way to include the variable?

Thanks

T

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the attached application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this

Sum({$<Fecha = {"<=$(=Today())-$(vNumDias)"}> Ventas)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

It does not work

sushil353
Master II
Master II

Try this:

Sum({$<Fecha = {"<=(Today()-$(vNumDias))"}> Ventas)

HTH

Sushil

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     What is the format of date in Fecha field?

     if its DD/MM/YYYY then try below expression.

     Sum({$<Fecha = {"<=$(=date(Today()-$(vNumDias),'DD/MM/YYYY'))"}> Ventas)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks a lot for your answers although unfortunately they didn't work,, I'm attaching qvw

fdelacal
Specialist
Specialist

Prueba con esto.

Sum({$<Fecha = {"$(='<='&DATE(Today()-$(vNumDias),'DD/MM/YYYY')"}> Ventas)

Saludos

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the attached application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!