I need a little bit of help with an expression I'm trying to create that will return an Even number when the result is odd by simply adding 1 (one) to the result, otherwise, leave the result as is if it's already an even number. For example, if the result is 3, I want to add 1 to it in order to make it 4, if result is 7 add 1 to make it 8, if result is 10, leave it as 10.
The expression I'm trying but which has some type of error (guessing a syntax error) is the following:
Thanks for the response. You’re right. Removing the “=” in the middle did indeed fix the syntax error. Thanks for that.
When the expression executes though after saving the update, I get no results. I get an empty table like the following:
If I change the expression to Sum(CPU2) / Count([Host Name]), I get the following table. I'm not worried about the N/A's at the moment. I'll clean them up later. I'm wanting the 3's to be 4's and the 21's to be 22's.
As an FYI, I won't be able to look at this again, most likely, until tomorrow.
Wow. So simple. I was obviously thinking I needed to use the Odd function and another Sum expression, but your solution is so much more simple. I was over-complicating it. One of these days, I'll know the correct functions to use. There's a lot of them, but that's part of the power of Qlikview.
Thank you very much for your help. It is appreciated. I will mark your answer as correct. Thanks again.