Question

Any calculator experts?

  • 18 April 2024
  • 2 replies
  • 12 views

Hi guys,

 

I am looking to potentially create a calculator that will help a client work out the cost of their energy bills based on their latest meter reads. Is there a way I can do the following:

 

1 - client enters their current rate in p/kWh

2 - client enters their standing charge in p/Day

3 - client provides their previous read from their bill

4 - the date of this bill

5 - client provides current read from their meter

6 - the date of this read

 

I would then want to calculate 5 - 3 * 1
PLUS - 6 - 4 (to work out number of days) multipled by cost of standing charge in 2


2 replies

Userlevel 7
Badge +5

@john.desborough is definitely your calculator person! He might also have a cheat sheet to assist with this. 

Userlevel 7
Badge +6

@TomMc - thought i had replied to this the other day..  my apologies

unfortunately there is no means to subtract one date from another. 

you would have to ask them for the number of days between the two billing dates. 

logic rules would be along these lines: 

  • q5 
    • if q5 greater than 0 add q5 to v_total 
    • if q5 greater than 0 subtract q3 from v_total
    • if q5 greater than 0 multiply v_total by q1
  • on q7 (an additional question asking for the number of days between the two readings) 
    • if q7 greater than 0 add q7 to v_standing_total
    • if q7 greater than 0 multiply v_standing_total by q2
    • if q7 greater than 0 add v_standing_total to v_total

(two variables were created in advance) 

des

Reply