Percentage Calculation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dodom2
    Senior Member
    • Jan 2020
    • 198

    Percentage Calculation

    Hello All. I have been working on this all day but cant seem to get it figured out. I need to get the percentage between 2 numbers. For example This is for calculating the percentage of a budget that has been used.



    usedamount = (amountUsedConverted/totalBudgetAmountConverted)*100;


    does anyone have experience with this formula?

    Thanks
  • eymen.elkum
    Member
    • Aug 2019
    • 41

    #2
    I think you have to use "usedAmount" instead of "usedamount"

    Comment

    • dodom2
      Senior Member
      • Jan 2020
      • 198

      #3

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Hi Dustin,
        could you tell what is the type of the 'usedamount' field. Is it a currency? Basically your formula looks correct, but also you have to make sure that you are not trying to divide by 0. Check the logs file whether there is no error description that applies to your issue.

        Comment

        • dodom2
          Senior Member
          • Jan 2020
          • 198

          #5
          It's a varchar field as its suppose to generate a percentage. Should I still use currency field here?

          Comment

          • eymen.elkum
            Member
            • Aug 2019
            • 41

            #6
            you have to use float type not varchar, or if formula has numberToStr function then you can use it

            Comment

            • dodom2
              Senior Member
              • Jan 2020
              • 198

              #7
              Thanks Eymen. I updated to Float but still not luck. Here is my current formula. https://prnt.sc/r3nlgw and here are the fields in the entity. https://prnt.sc/r3nlnj

              Comment

              • eymen.elkum
                Member
                • Aug 2019
                • 41

                #8
                can you send me your custom folder as zip file, will be better eymen@eblasoft.com.tr
                Last edited by eymen.elkum; 02-14-2024, 06:18 AM.

                Comment

                • dodom2
                  Senior Member
                  • Jan 2020
                  • 198

                  #9
                  I've never done that before. How would I go about that?

                  Comment


                  • eymen.elkum
                    eymen.elkum commented
                    Editing a comment
                    just email me,
                • dodom2
                  Senior Member
                  • Jan 2020
                  • 198

                  #10
                  I'd rather keep all communication here so others in the future have a thread to learn how to do what Im doing. Im happy to provide a link to a zip folder here if you want to tell me how.

                  Comment


                  • eymen.elkum
                    eymen.elkum commented
                    Editing a comment
                    you can make custom.zip and upload to any public storage, then I or anyone can help you, and of course will post the solution here,
                Working...