You can find the answers to last week's challenge here .
This challenge was submitted by enthusiastic community members Jifeng Qiu ( @Qiu ) and Motoi Tokimatsu ( @Tokimatsu ) . Thank you Qiu and Tokimatsu for your contributions to the community.
In the Engineering, Procurement and Construction ( EPC ) sector of chemical plants, equipment tags play an important role in managing equipment, such as differentiating and labeling pumps as P-101A and P-101B . Upstream design departments still prefer to make tags the old-fashioned way, usually concatenating tags into formats like 101A/B or P-101A-B . This approach creates headaches for downstream data processing.
Your task this week is to parse these concatenated tags to make life easier for everyone involved. Be sure to start each new tag with the first character and end with the last character.
Create an Alteryx workflow to sequentially generate new device tags based on the provided dataset. For example, the tag P-101A/E will be output as P-101A , P-101B , P-101C , P-101D , and P-101E .
Embark on this adventure and unravel equipment tags accurately and efficiently!
Good luck!
できました。
行生成ツール一発でいけるやつです
開始と終了の文字をChartoIntで文字コード(数値)化し、それをもって行生成していきます
初期値の設定
REGEX_Replace([tag],"^([PTB]\d+[A-Z]?).*","$1")
繰り返し条件:終了の文字に相当する文字コード以下である限り、繰り返す
ChartoInt(REGEX_Replace([New_tag],"^[PTB]\d+([A-Z])$","$1"))<=ChartoInt(REGEX_Replace([tag],"^[PTB]\d+.*([A-Z])$","$1"))
インクリメント:文字コードを1ずつ増やしていく
REGEX_Replace([tag],"^([PTB]\d+)([A-Z]).*([A-Z])$","$1")
+CharfromInt(Chartoint(REGEX_Replace([New_tag],"^[PTB]\d+([A-Z])$","$1"))+1)
Advent of Codeのおかげで、処理の引き出しがかなり増えました
回答します。
end = Right([tag2], 1)
Generate Rows
Initialization Expression: start
Condition Expression: tag3 <= end
Loop Expression: CharFromInt(CharToInt([tag3])+1)
Formula 2
New_Tag = [tag1]+[tag3]
できました!
できました。