Joined: 26 Mar 2012
Location: United States
Online Status: Offline
Posts: 7
Topic: Max function Posted: 26 Mar 2012 at 8:55am
I am trying to display a value only if it meets a certain criteria for which I have a formula - retrieve only the values from the database where the value of a given field > 0:
Here is my code:
if ({sp_MONTHLY_STATUS_BY_REP1.Status} = "Completed" AND {sp_MONTHLY_STATUS_BY_REP1.CountOfStatus} > 0) then {sp_MONTHLY_STATUS_BY_REP1.CountOfStatus}
Problem is.. I still get records that have a value = 0. Can someone help, please?
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 26 Mar 2012 at 9:17am
I am bit confused. So are you seeing records where {sp_MONTHLY_STATUS_BY_REP1.CountOfStatus} = 0 (I do not think the formula above would work properly for record selection) or the result of the formula you are seeing 0's? If you are seeing 0's as the result of your formula, something is seriously amiss.
Joined: 26 Mar 2012
Location: United States
Online Status: Offline
Posts: 7
Posted: 27 Mar 2012 at 6:32am
Thanks. Solved..
My requirement was to retrieve only the value that was > 0. And I achieved that by calculating the Running total instead because all the rest in the group were 0 and I needed to capture only the one that was not.
But I have a different question though. Not sure if I can continue to post it here.. maybe I will create a different thread fo r that.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum