Tanvish Thakker Posted June 18, 2021 Share Posted June 18, 2021 This is the Expression I am using:Concatenate([channel1],"_",[channel2],"_",[channel3],"_",[channel4]) In cases where channel2 and channel3 are null the output is abc___def (here abc is channel1 value and def is channel4 value I want the output to be abc_def It currently does not ignore empty fields Is there a workaround Link to comment Share on other sites More sharing options...
Fabian Duerr Posted June 21, 2021 Share Posted June 21, 2021 Here's an R Script that you can use: Input: "data";type = Table; all columns you want to concetenate Output: "MyConcat"; type = Column; this column has to be added to your tabel # getting the number of rows of your data n Link to comment Share on other sites More sharing options...
Fabian Duerr Posted June 21, 2021 Share Posted June 21, 2021 You can also extend your solution with a regular expression that removes all leading and all trailing "_" and that replaces all multiple "_" with a single "_" Please check the RXReplace() function for this approach Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now