Skip to main content
Answer

Add previous answers in new question

  • December 17, 2021
  • 2 replies
  • 116 views

I have taken two inputs Income and Expenses from the user, let’s say number 1 and number 2.

How can I show the subtraction of these two numbers in a third question?

Best answer by john.desborough

@Multipie - welcome to the community. 

create a variable call it v_netrev for example and set it to 0 by default

then if income is q1 and expenses is q2: 

  • if q1 is greater than 0 add q1 to v_netrev
  • if q2 is greater than or equal 0 then subtract q2 from v_netrev

you can then @recall the v_netrev variable as the difference between the two numbers. 

 

cheers

 

des

2 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • Answer
  • December 17, 2021

@Multipie - welcome to the community. 

create a variable call it v_netrev for example and set it to 0 by default

then if income is q1 and expenses is q2: 

  • if q1 is greater than 0 add q1 to v_netrev
  • if q2 is greater than or equal 0 then subtract q2 from v_netrev

you can then @recall the v_netrev variable as the difference between the two numbers. 

 

cheers

 

des


Liz
Ex–Typefomer
Forum|alt.badge.img+5
  • Tech Community Advocate
  • December 27, 2021

Hi @Multipie Were you able to give @john.desborough ‘s solution a try?