on 2016 Dec 11 8:23 PM
Our headcount numbers could be 0.7, 2.3, -0.2 etc. We would like to round up the numbers to get the seat count. In the above examples it should be 1, 3, -1. Wondering what is the script logic to get round up function.
*XDIM_MEMBERSET HC_ACCOUNT = HEADCOUNT_SAW
*WHEN HC_ACCOUNT
*IS HEADCOUNT_SAW
*REC(EXPRESSION = %VALUE%,HC_ACCOUNT = "SEATCOUNT_SAW")
*ENDWHEN
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
For your particular case the following can be used:
*REC(EXPRESSION=(%VALUE%>0) ? Math.ceil(%VALUE%) : Math.floor(%VALUE%),HC_ACCOUNT = "SEATCOUNT_SAW")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.