Reference a sum in a query

I have a query that calculates the Current Year Profit.
image

Now I need to use that in an if statement in another query, where if the condition is met, I return the Current Year Profit.

I tried to write this statement, but it doesn’t work.
image

How do I return the value of the Get Profit Current Year in the if statement?

@BillK

Possible to provide a file? Can’t reproduce the issue

You are right. It does work. My mistake was the the account number 3500-00-00 is text. In my if statement I needed to put it in quotes “3500-00-00”. Once I did that everything worked.

Thanks for the prompt reply

1 Like