0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

計算フィールドで同じ名前を使えば、削除の手間が省かれる / Tableau Prep

Posted at

Tableau Prepで途中計算を作る場合、計算フィールドで途中式を使って計算し、次にそれを使って計算フィールドを作成し、わからなくなっちゃうから不要になったら削除、あるいは最後に途中式ばかりを一気に削除とかしていませんか?

実は、計算フィールドの名前に、同じものを使うと、ステップごとに値が上書きされていくので、途中計算がそのままの名称でできます!

よくやってしまいがちなこと

Profitを四捨五入した数値にしたい場合に、計算式でProfit2と称して四捨五入した値を求めて、そのあとオリジナルのProfitを削除し、フィールド名を変更する

image.png

処理自体は間違っていないけど、フィールドを追加して、削除してを繰り返すので、どのフィールドを残すかだんだん混乱してきます。そんなときに、フィールドの上書きがお勧めです。

実はこれだけでOK

実は同じフィールド名を指定できます。
image.png

フィールド名が同じ場合に、以下のような警告はでますが、OKで解決です。
image.png

感想

フィールド削除は、フィールド名の変更処理がいらないので、2ステップは削減でき、すっきりわかりやすいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?