Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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

Hi,

     Have a look at the attached application.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

7 Replies
kaushiknsolanki

Hi,

     Try this

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

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Not applicable
Author

It does not work

sushil353
Master II
Master II

Try this:

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

HTH

Sushil

kaushiknsolanki

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
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

Hi,

     Have a look at the attached application.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post