# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for
Did you mean:  Contributor II

## Set Analysis with variables

Hi,

I'm new to the community! I have a problem, I could not fix it

I want to see the sum of the budget amount accumulated up to the current month, to try to solve, I have created two variables, one stores the current year (vAñoActual) and the other stores the current month (vMesActual)

the next line does not do the required calculation

Sum( {<Año={\$(vAñoactual)}> - < Mes={">"\$(vMesActual)""}>  } MontoPtto)

the next line does the calculation, but it is not correct, it does not exclude the indicated values

Sum( {<Año={\$(vAñoactual)}> - < Mes={">\$(vMesActual)"}>  } MontoPtto)

to make it work, put the month in number
Sum( {<Año={\$(vAñoactual)}> - < Mes={">8"}>  } MontoPtto)

What I want is to replace that 8 with a variable, as I did in the case of the current year.

Attached example app

1 Solution

Accepted Solutions  MVP

Try this

Sum({<Año = {\$(vAñoactual)}, Mes = {"\$(='<=' & \$(vMesActual))"}>} MontoPtto)

Where vMesActual is Num(Month(Today()))

3 Replies  MVP

Try this

Sum({<Año = {\$(vAñoactual)}, Mes = {"\$(='<=' & \$(vMesActual))"}>} MontoPtto)

Where vMesActual is Num(Month(Today()))  Contributor II
Author

excellent, it's working

thank you very much    Contributor II
Author

excellent, it's working

thank you very much 