Skip to main content
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
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

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


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

5 Replies
tresesco
MVP
MVP

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

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


kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
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.