MichaelNaser
Qrew Trainee
2 years ago

# How to create where clause in quickbase

Hi Everyone!
I'm pretty much new to Quickbase so I'm having some issues in creating formulas in Quickbase! Basically the problem here is that I don't know how to create "where clauses" in Quickbase.
For instance this formula works fine, but I do not know how to exculde "volunteer time sheet cost" from the calculation
If ([Project - ProjID]="AD0014",([Volunteer and Training Time Sheet Cost]+),0)

I would like to add following condittion so I can have the correct numbers
Where the [Project classification]="Training"

------------------------------
Michael Naser
------------------------------

### 2 Replies

• You would use a nested if, the WHERE condition precedes the secondary conditional. What this does is evaluate the first conditional and everything that meets the condition is displayed in the cell. Then if the first condition fails the second condition is evaluated, if it is true then that value  is displayed. Finally if the second condition fails, the final displayed value is 0.

If ([Project - ProjID]="AD0014" and [Project classification]="Training", ,
If([Project - ProjID]="AD0014" ,([Volunteer and Training Time Sheet Cost]+),0))

------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------
• Good morning,
I would think that you want this Formula to apply to any record inside of your data not just the ProjectID AD0014.

Also, it is unclear what you are trying to accomplish and the makeup of your data. In order to only calculate this value when the Project Classification="Training, then you can simply add "and [Project Classification]="Training", like this.
If ([Project - ProjID]="AD0014" and [Project Classification]="Training,([Volunteer and Training Time Sheet Cost]+),0)

I would recommend considering removing [Project - ProjID]="AD0014" and it would become If([Project Classification]="Training,([Volunteer and Training Time Sheet Cost]+),0)

------------------------------
John Crosland
------------------------------