I am not sure what you are trying to acheive based on your script. But if it is what you say in the text you can try this:
Replace LOAD *,
IF(Not IsNull(DATE_1),1) &
IF(Not IsNull(DATE_2),2) &
IF(Not IsNull(DATE_4),4) &
IF(Not IsNull(DATE_6),6) &
Since I have not access to your source file I just added the code above and took a partial reload based on the data you had in the app. It seems to work. You don't need the qualify commands nor the Replace load.
Attached is the code you can test with a partial reload.