1 Reply Latest reply on Apr 11, 2018 8:08 AM by Jim Dehner

    Need to cut a calculation field to a certain number

    V VV

      Hi all.

      I'm working on a project and have a question about cutting the result of a calculation field.

      I have a calculation that returns % value and sometimes is more than 100%.

      What I need it for all values more than 100% to return them into 100%.

      I can create one more calculation with IF that I don't want to do and thinking I can achieve it somehow in the same calculation.

      (can't post my workbook since it's not a public data but here is the calculation. I count utilization rate that can't exceed 100%

       

      if[Occupancy Mar 18]>0

      then if [Occupancy Mar 18]<31

      then (([Occupancy Mar 18]+([Trip Count Mar 18]-[Trip Count Feb 18]) - ZN([Unavailable by owner Mar18]))/(31-ZN([Unavailable by owner Mar18])))

      ELSEIF [Occupancy Mar 18]=31 then (([Occupancy Mar 18]-ZN([Unavailable by owner Mar18]))/(31-ZN([Unavailable by owner Mar18]))) END

       

      ELSEIF [Occupancy Mar 18]=0 then 0 END

       

      thanks a lot!

        • 1. Re: Need to cut a calculation field to a certain number
          Jim Dehner

          Not having the advantage of seeing the calculation it is a little difficult - but if you r calculation is an LOD you can use something like

           

                        Min(yourcalc,1)  (assuming that your calculation is percentage)

           

          if it is not then you are left with           if [your calculation]>1 then 1 else [your calculation] end

           

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          1 of 1 people found this helpful