I have a simple table with 3 columns:
Date 1 containing dates
Date 2 containing different dates
ChosenDate containing either the value Date1 or Date 2.
For each record I would like to see a field called NewDate which is either Date1 or Date2 depending on the value in ChosenDate. Currently I tried $(ChosenDate) as NewDate but no luck. Any suggestions?
I think this will work:
Data:LOAD *, RecNo() as Key INLINE [ChosenDate, Date1, Date2, Date3Date1, 100, 200, 300Date2, 101, 201, 301Date3, 103, 203, 303Date2, 104, 204, 304];
Choose:LOAD Key,peek(peek('ChosenDate', RecNo()-1, 'Data'), RecNo()-1, 'Data') as NewDateResident Data;
Thanks. Unfortunately I don't have RecNo in my table, which is a complex join of other tables.
RecNo() is not a field, it's a counter function. You have it.