
ライセンスを見える化する体験記録と感想(Power Query・Power BI)③PowerQueryの編集
前回までの記事はこちら
いよいよPower Query!
復習しながらこのnoteを書いてるんだけど
上手くいくかな(不安)
しゃ、がんばってこ!
よし! Power Query! 他の列の削除
ELISTで残したいExcelの列をCtrl押しながら選択
※今回は残したいのはこちら
EmployeeNo /EDisplayName/Department/Office/LicenseA/LicenseB/LicenseC/ LicenseD/LicenseE/LicenseF/LicenseG/LicenseH/LicenseI/LicenseJ/LicenseK/ LicenseL/LicenseM/LicenseN/LicenseO
「ホーム」→「列の削除」の横の小さい▼を押す

「他の列の削除」をクリック

おおお!残った!これは便利!

値の置換
今度は空白があったら「-」に変換する作業
LicenseA~O列を選択した状態で
変換→値の変換→値の変換

こう入力して「OK」

今度は記号の「○」を値にする作業
LicenseB列を選択して、変換→値の変換→値の変換
でこう入力!
イケボ「Licenseの文字をここでコピーしとくといいよ」
そ、そうなの?しときます!
OK!

うんうん。いい感じ。

「はい、ではLicenseOまで同じことしてください。
できたら言ってください」
はーい。
さっきのコピペが大活躍!ちまちま…

ここでakira先生が
「小学生や中学生もカテキョするから
お子さんが必要になったら言ってね」というお話。
「でもお高いんでしょう?笑」 と思ったら相場価格。
このハイスペック先生がカテキョっていいな。
本気で考えよう笑 オンライン万歳!
ゆくゆく一家そろってイケボ先生のお世話になるかもしれん。
で、雑談してたらLicenseOまでできた。
「できましたーーーー」

カスタム列の追加(ちょっとややこい)
ここで今から何をするかご説明を受けた、
手書きの紙のノートに必死で書いたんだけど汚すぎて読めなかった。
(バカ)
おぼろげながら、なんかガッチャンコする的な感じで受け取った。
(適当)
このままLicenseO列を選択した状態でいいので
列の追加→カスタム列

この画面で右側からLicenseAを選んだ状態で「挿入」
左側にぴょこっとでてくる

&でつないで

”;”と入力してまた&

次はLicenseBを挿入

以降、Oまで繰り返すとのことで、
今ある数式をコピペしてアルファベット変えたらそれでもいけた♪
コピペコピペコピペ

アルファベット変更
(いまだにABCの歌を脳内再生せな順番わからんくなるんやけど
私だけやろうか・・・)

左下に「構文エラーが検出されませんでした」を確認してから「OK」

どんっ!
LicenseA~Oまでを全部くっつけた列ができた!

で、LicenseA~Oは削除。
サヨナラ、ありがとう。忘れないよ。

シンプルな表になった✨

PowerQueryでの作業は、もともとのデータに干渉しないでできるそう!
ほー。
列の分割
カスタム列を選択した状態で、
変換→列の分割→区切り文字による分割

こんな画面がでてくるので
真ん中あたりの「詳細設定オプション」 をクリック

ここを列→行に変えたらOK

おおお!
横並びに一人の従業員が持っていると表記されていたものが
分割されました!

ひとつひとつ作業を進めるので私でもできてる😿
akira先生に感謝感謝・・・
もしあっちの複数ルームやったらあかんかったかもしれへん
(いや、そもそも初っ端で脱落してるし)
復習もいい感じ・・・でもこのペースでnote書いてたらものすごい長くなりそうということに今気づいた(゚д゚)
ま、いっか。
ぼちぼちね。
また続きいつか書きますね。
いいなと思ったら応援しよう!
