Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody
Can someone explain why this formula doesn't return preivous month result but current month result ?
sum (mois_ref={'=$(vPreviousMonth)'}>} if(id<>2 and (type = 2 or pos < 0), lig))
vPreviousMonth = max(mois_ref)-1
I reckon you shouldn't worry about IF test.
It is a SET I use quite often for years.
Best regards
Chris
To begin with I would get rid of the = in front of the $(vPreviousMonth). Next, is mois_ref a number or a text value? max doesn't work on strings. Finally the expression in the variable should be =max(mois_ref)-1, not just max(mois_ref)-1. So include the = in the variable. Otherwise weird things may happen because the variable will be evaluated in place in the sum expression.
To begin with I would get rid of the = in front of the $(vPreviousMonth). Next, is mois_ref a number or a text value? max doesn't work on strings. Finally the expression in the variable should be =max(mois_ref)-1, not just max(mois_ref)-1. So include the = in the variable. Otherwise weird things may happen because the variable will be evaluated in place in the sum expression.
Hy Gysbert,
I tried removing = sign but the result is the same.
Mois_ref is a num and my vPreviousMonth was defined as =max(mois_ref)-1.
I just misunderstand the behavior.
I hope you'll be clever than me
Chris
Then you'll have to post a document that demonstrates the problem.
I'm sorry Gysbert I can't
But thank you anyway for your answer.
Chris
Perhaps you can: Preparing examples for Upload - Reduction and Data Scrambling
Yes I know but there are too many data to scramble
It is just a matter of time
But I came back on the Set which was more complex than the one I posted and rework everything from variable to a specific numeric field and removing = sign
And it works
I must say I appreciate your advices on many post
So thank you.
Chris