Yes, in fact that would be an example of the "fancy stuff" mentioned above! Take a look at the section on Advanced Features in the manual or online help--especially the section on calculated variables for a feature like what you're describing.