Forum Discussion

JonathanXu1's avatar
JonathanXu1
Qrew Trainee
6 years ago

ToNumber function keep failing when using formula to create gauge chart

I am trying to create a gauge chart by using formula-numeric-percent. The formula is based on the division of 2 ToNumber functions. The result is an irrelevant integer. 

In my case, ToNumber([checkbox1]) =30 and ToNumber([checkbox2]) = 42

when I enter following into QB formula, the return is still 30 instead of 0.71

ToNumber([checkbox1])/ToNumber([checkbox2])

I have 0 backgrounds on programming. Really need help here. 

Thank you!

    • JonathanXu1's avatar
      JonathanXu1
      Qrew Trainee
      Checkbox1 has the field type as Checkbox. I used the ToNumber function to get the total count in my table for how many rows have the checkbox1 being checked. Same for the Checkbox2. 

      I was able to use get ToNumber([Submit Pass Due])=30 and ToNumber([Submitted])=42. Both numbers were verified to be shown correctly. But once I put these 2 into division, it is keep showing the numerator only instead of 0.714....

  • Checkbox1 has total count as 30 and the checkbox2 has total count as 42. Thank you!
  • Have you tried to use just a formula-numeric field? Also, have you confirmed in the formula field that the ToNumber of your checkbox# fields equal 30 and 42? What are the field types of the checkbox fields?

    I tested this scenario myself and am getting correct results using a formula-numeric field:


     Result:


    • JonathanXu1's avatar
      JonathanXu1
      Qrew Trainee
      Hi Jordan, both checkbox# fields have the type as Checkbox. I used ToNumber function to get the total count of how many rows have the checkboxes checked. I was able to get the chart show the ToNumber result correctly on individual ToNumber. But when I put both into division, the chart only shows the numerator instead of 0.714...