Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to transform data and tried using match function but was not successful. So here i'm for help please help me
I have a field name "Line" with 2 values (HINDU and TIMES) and the requirement is where ever the value "TIMES" exists it should be replace by " ECONOMIC". Please help me
Attached the excel with the sample data.
Regards,
Ramya
Hello Ramya,
You can try below given approaches:
1. Using REPLACE Function
//This approach will not work as expected if Line field has value word with TIMES in it.
// e.g. MEGATIMES - This will produce result as MEGAECONOMIC
Replace(Line, 'TIMES', 'ECONOMIC') AS Line
2. Using IF Function
If(Line = 'TIMES', 'ECONOMIC', Line) AS Line
Hope this will be helpful.
Regards!
Rahul
Hello Ramya,
You can try below given approaches:
1. Using REPLACE Function
//This approach will not work as expected if Line field has value word with TIMES in it.
// e.g. MEGATIMES - This will produce result as MEGAECONOMIC
Replace(Line, 'TIMES', 'ECONOMIC') AS Line
2. Using IF Function
If(Line = 'TIMES', 'ECONOMIC', Line) AS Line
Hope this will be helpful.
Regards!
Rahul
It worked. Thank you Rahul,
Ramya
Cheers,
Ramya