Forum Discussion

RoxanneZiegler's avatar
RoxanneZiegler
Qrew Cadet
5 days ago

syntax help with formula

I am making a formula and I am having trouble with syntax

I want the statement to say 
If([Sale]="Yes", than show [Manifest Price] but if ([sale]="cancelled" show 0.00)

I need the syntax for "than show" "and but if"

 

Edit 

I got some of that formula to work

If([Sale]="yes",[Manifest price w/o iva],([Sale]="Cancel"),(0))

all it give me is the Cancel ones at 0 

The manifest price one is blank

 

Edit - Solved by AI Chatgpt 

If(Trim([Sale])="Yes",[Manifest price w/o iva],Trim([Sale])="Cancel",0,0)//Default value if[Sale]is neither "yes"nor "cancel"

 

 

 

 

 

 

  • The comma before the 0 is yellow. 

    I did get this to sort of work 

    If([Sale]="yes",[Manifest price w/o iva],([Sale]="Cancel"),(0))

    The cancel ones are 0 however there are no other prices from manifest price in there

     

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Can you try my suggested Syntax?

      IF(

      [Sale]="yes",[Manifest price w/o iva],

      [Sale]="Cancel",0)

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Sorry use this.  The Yes is case sensitive

      IF(

      [Sale]="Yes",[Manifest price w/o iva],

      [Sale]="Cancel",0)

       

      .. assuming that the value in the field sales is Yes and not yes..