This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!
Hi,
I want to transform my Headers Input to the Desired Header format.
Basically need to replace the "_" from the headers except for few of them which has the same header name only a no 2 is added after it with "_".
example : Turlock 0621_2. Apart from this types rest all "_" needs to be removed. The sample Data with headers are attached below. Can someone help me out in this.
Solved! Go to Solution.
hello @DataPirate26
See solution attached!
@gautiergodard You missed out one point which I mentioned. That there are few exceptions in which I need the underscores. Example Turlock 0621_2. There are 3 4 cases in which a no 2 is added at the last. In those cases I need to keep the underscores. Can you check the desired headers Sample once.
@gautiergodard When the Headers are exact same but only at last the No 2 is added in that case i need to keep the underscore before the number 2. Apart from that all underscores to be removed
@DataPirate26 here you go!
@gautiergodard This worked perfectly fine. Thanx a lot for your quick response.
@DataPirate26 One way of doing this
IIF(EndsWith([_CurrentField_], '_2'),Replace(REGEX_Replace([_CurrentField_], '(.*)(_.*)', '$1'),'_','-')+'_2',Replace([_CurrentField_],'_','-'))