Replace field value with a specific value in Qlik Sense script
I am looking to replace customer names with a certain value (i.e. 'X') based on the condition that the delivery for the customer was done earlier than 2 years ago. Therefore, I tried the following using an if statement but it doesn't seem to work properly:
if(Delivery_Date < 2017.01.01, Customer_Name='*', Customer_Name) as Customer_Name,
Also, is it possible to have the date as a dynamic field: based on the loading date, to replace everything that is older than 2 years?