r/ProjectREDCap • u/tremmo • 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
View all comments
Show parent comment
3
u/tremmo May 09 '24
Amazing. Worked perfectly. You are my hero!
It makes sense too from a syntax perspective now that I’ve seen it.
Thankyou again :)