Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
fabricius
Contributor II
Contributor II

Using variables in a sum formula

I can not get this formula to work with a variable.

I want to replace the 6 with a variable (manually set month)

Can anyone help me?

Sum({<Month={'<=6'},Year={"$(=Year(Today()))"},[Dept. No]={'820'},Project={'SKAND-820*'}>} Hours)

I have made a variable "vMonth" (see below) but it does not work.

2017-08-10  11.53.33.png

1 Solution

Accepted Solutions
kaushiknsolanki

Try this,

Sum({<Month={'<=$(vMonth)'},Year={"$(=Year(Today()))"},[Dept. No]={'820'},Project={'SKAND-820*'}>} Hours)


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

5 Replies
tresesco
MVP
MVP

How did you try putting the variable in the expression? Like:

Sum({<Month={'<=$(vMonth)'},... ?


kaushiknsolanki

Try this,

Sum({<Month={'<=$(vMonth)'},Year={"$(=Year(Today()))"},[Dept. No]={'820'},Project={'SKAND-820*'}>} Hours)


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

ankur_abhishek
Contributor III
Contributor III

Sum({<Month={'<=$(vMonth)'},Year={$(=Year(Today()))},[Dept. No]={'820'},Project={"SKAND-820*"}>} Hours)

fabricius
Contributor II
Contributor II
Author

Thanks a LOT 😉

fabricius
Contributor II
Contributor II
Author

Works 🙂 Thanks a lot for your help.