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.
I wanted to check what is the most efficient way to lookup through multiple columns with similar field names.
In the example file, I want to only output dates if DTn=1. Keep in mind in this file n is from 1-30 so there are about this many date type columns. Hence I want to avoid using the formula tool. The output column shows what the output should look like
The trick here is create 2 separate transposed lists, one with the DATE* column names/values and one with the DT* names/values. You then join them up on ID and column number. This gives you one list with 3 fields ID, Date and DateFlag that a single Formula tool can process. The Summarize compresses this list back to the original 17 rows with the Output column. Join back to the original on ID if required