Answered

Working out employee emissions calculator

  • 8 April 2022
  • 8 replies
  • 91 views

Userlevel 3
Badge +2

I’m struggling using the left side of brain!

Can someone help me work out the logic for the following calculation:


Qu.1 How many employees do you have? Employees as a numerical value

800 x (Employees x 0.667) = total energy

total energy x 0.184 = Emissions kg CO2

Then display ‘Emissions kg CO2’ on end screen

 

Thanks in advance :)

 

 

 

icon

Best answer by john.desborough 8 April 2022, 21:28

View original

8 replies

Userlevel 3
Badge +2

Not to worry, think I’m sorted! My left brain kicked in after some lunch :)

Userlevel 7
Badge +6

@LewisK - damn.. i started to work it out then hopped onto a call and just got back with little solution lol.. 

i wonder if my test form at the link above gives the same answers that you got.. 

 

des

 

Userlevel 3
Badge +2

@john.desborough you’re a legend sir :)

I wonder if yours is more accurate than mine?! If i input 50 employees, my result is 4824, whereas yours gives 4909.12.

Would you mind sharing your logic. Mine attached as screenshots

.

Seems to limit my variables to 2 decimal places. Can that be changed?

Many thanks

Lewis

 

Userlevel 7
Badge +6

@LewisK - the 2 decimal place is a restriction at the moment .. a little frustrating, i know .. but a while back you could not even set up the number variables to have decimals at all.. 

i will share the screens below but a couple of notes: 

  • i created the variables slightly different - i created a constant of 800 * .667 = 533.6 (math order of operations says it doesn’t matter when you do the math - this way you don’t lose your 007 - oh that’s funny .. lol ) 
  • i also did a ‘wonky trick’ in the usage of .184 which you will see.. to get around the 004 being dropped. 

 

 

 

 

Userlevel 3
Badge +2

This is great, love the workaround to get the decimal places included.

Thanks so much, have a good weekend!

Userlevel 7
Badge +5

Happy you enjoyed the workaround provided by Des, @LewisK! Why don't you share your form with us so we can give some feedback on it? We'd love to do it! 😉

Userlevel 3
Badge +2

Will do @Gabi Amaral, i’m just adding some more layers to it.

 

Userlevel 7
Badge +5

Amazing, @LewisK! Can't wait to check it out! 😉

Reply