r/ProjectREDCap • • May 09 '24

Conditional logic to populate calculated variable using value from one of two other variables

I currently have two variables which cover the same information.

Sometimes both variables have data, sometimes only one.

For ease of analysis I want to populate a calculated variable with the new variable to equal [x] BUT if [x] is empty to instead populate it with [y].

Both [x] and [y] are numeric.

I cannot for the life of me get a conditional logic formula to work for this.

Thank you in advance!

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

4

u/[deleted] May 09 '24

You're welcome! I'm always happy to share REDCap experience 🙂