Free Trial

ウィークリーチャレンジ

トップになるためのスキルをお持ちですか? ウィークリーチャレンジを購読しましょう。ベストを尽くして問題を解決し、解決策を共有して、他のユーザーがどのように同じ問題に取り組んだのか確認しましょう。私たちも解答例を共有しています。

チャレンジ #251: 機器タグの解析

AYXAcademy
Alteryx
Alteryx

 

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.

 

AYXAcademy_0-1704818799046.png

 

 

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!

 

Qiu
20 - Arcturus
20 - Arcturus

できました。

スポイラ
Challenge 251_.png
gawa
15 - Aurora
15 - Aurora

行生成ツール一発でいけるやつです

スポイラ

開始と終了の文字を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)


image.png

 Advent of Codeのおかげで、処理の引き出しがかなり増えました

Yoshiro_Fujimori
オーロラ

回答します。

 

スポイラ
Workflow
Challenge 251_ja_YFujimori.png
Formula 1
tag1 = Left([tag], 4)
tag2 = Substring([tag],4,Length([tag])-4)
start = Left([tag2], 1)

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]

 

 

AkimasaKajitani
17 - Castor
17 - Castor

できました!

 

スポイラ
251.png

sanae
ボリード

できました!

スポイラ
アルファベットの範囲生成はコミュニティ内の投稿を参考にさせていただきました。
challenge_251_start_file_ja_sanae.png
DaisukeTsuchiya
パルサー

やっと追いつきました。

 

スポイラ
スクリーンショット 2024-01-18 160728.png