Page 1 of 1

Question Thanks for help-me

Posted: Wed Oct 11, 2023 5:21 pm
by alexoliveira
Is it possible to create a calculator like this?

https://imageupload.io/qlqplh3WctEJOgZ

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 5:28 pm
by crispy68
Anything is possible. What have you tried thus far?

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 5:30 pm
by alexoliveira
I haven't tried it yet, if possible could you tell me the next steps? I would like to provide an example answer, I ask the customer how many people will be at the party and consume the beer and how many hours, then I will provide the result like in the image.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 6:25 pm
by crispy68
So what is the formula you are using to get the answer you want?

Your example is:
20 people at party for 5 hours = what??

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:01 pm
by alexoliveira
I'm using this cauculator method: Conditions...

Number(([value1]) + 2.5) * Number(([value2]) + 2.5) + 'L'

unfortunately he is giving the changed value, as I would like to present 1 person at a party for 1 hour = 4 L

image: https://ibb.co/9Hg0VMG

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:10 pm
by crispy68
Sorry, i'm still not following your logic or the context on how it is supposed to work.

What is value1? What is value2? What is 'L'?

Based on what you're saying you have this:

(1 person + 2.5) x (1 hour + 2.5) + L

which is:

3.5 x 3.5 + L

This doesn't make sense to me at the moment.

What exactly are you trying to figure out with the computation?

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:15 pm
by alexoliveira
value1 is the number of people value2 is the number of hours the event lasts. L means quantity of liters of draft beer, in this case I would like the quantity of 1 person in 1 hour to be 2.5L (liters) ... this value is doubled when I change it to 2 people or 2 hours

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:18 pm
by crispy68
Ok, so your are trying to figure out the total number of Liters of beer based on the number of people attending over a certain amount of time and figuring 2.5L per person per hour.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:18 pm
by alexoliveira
exactly

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:24 pm
by crispy68
I am not at home to try this in WB yet, but your math/formula should be something like this:

(value2 * 2.5)*value1 = Total L

ex:
(8 hours x 2.5) x 10 people = Total L
20 x 10 = 200 L

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:27 pm
by alexoliveira
How do I add this calculation you sent inside the expression box?

https://ibb.co/y0C0WZM

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:30 pm
by onlye
There are a number of companies that provide flexible calculators to embed in your website. Just copy and paste their code to an HTML object on your site. I can't remember which one I used for a Rock and Soil estimator for a customer. Most are a monthly fee but provide a "free" version with limited customization and typically about 500 impressons per month. Here are a few to look over:

https://www.interactivecalculator.com/
https://www.gigacalculator.com/
https://www.calculoid.com/
https://www.calconic.com/pricing
https://embed.calculator.zone/

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:34 pm
by crispy68
I'm not at my computer to test this but based on what you've written, it would be something like this:

Number(([value2])*2.5)*Number([value1])

which is just the number of hours x 2.5 x the number of people.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:35 pm
by alexoliveira
Thank you for the indication only, but we are almost reaching the desired result here, I just need the correct calculation :)

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 7:39 pm
by crispy68
The calculation should be correct. Just not sure if that 'code' is correct until I can test it.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 8:11 pm
by alexoliveira
Thanks crispy, your solution fit like a glove. Solution completed.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 9:29 pm
by alan_sh
2.5 litres of beer per hour? That's a lot of liquid to consume.

Re: Question Thanks for help-me

Posted: Wed Oct 11, 2023 11:02 pm
by crispy68
That's a hell of a party! :wink:

Re: Question Thanks for help-me

Posted: Thu Oct 12, 2023 12:02 am
by alexoliveira
But the intention was to solve the code, thank you to everyone involved, especially the crunchy