Skip to main content
Solved

Trying to calculate formula for discount

  • August 28, 2023
  • 3 replies
  • 36 views

Forum|alt.badge.img+2

Hi there, 

I am trying to calculate a formula for a discount. The discount category is single select (10% or 20%). 

I want to calculate what the total revenue will be with the selected discount. The current formula for revenue is (price * quantity)

 

Best answer by Sho

Hi @amber_elane ,

The Single select field returns a string, if it is a string such as 10% or 20%, it can be converted to a number with the VALUE function.

{Revenue}*(1-VALUE({Disucount}))

 

3 replies

Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • August 28, 2023

Hi @amber_elane ,

The Single select field returns a string, if it is a string such as 10% or 20%, it can be converted to a number with the VALUE function.

{Revenue}*(1-VALUE({Disucount}))

 


Forum|alt.badge.img+2
  • Author
  • New Participant
  • August 29, 2023

Hi @amber_elane ,

The Single select field returns a string, if it is a string such as 10% or 20%, it can be converted to a number with the VALUE function.

{Revenue}*(1-VALUE({Disucount}))

 


Hi @Sho thank you so much! That worked perfectly. 


Forum|alt.badge.img+6

Hi @amber_elane ,

The Single select field returns a string, if it is a string such as 10% or 20%, it can be converted to a number with the VALUE function.

{Revenue}*(1-VALUE({Disucount}))

 


Just to add onto this... obviously the "%" should be removed from the string before using the VALUE function.