背景
会社にて、Number.Random() で乱数が生成出来ない。との発言有。
以前使った際は困った記憶がなかったので、現状での対応策の備忘録
対象関数
概要
最適化によって、全行が同一値になってしまう。
詳細は以下記事が分かりやすいと思います。
対応策
上の記事 にあるように、以下を対処する
行ごとの処理(Table.AddColumn)で再評価が行われるようにするにはどうしたらよいか。カレント行を参照すればよいのだ。
具体的には以下太文字のようにする
= Table.AddColumn(変更された型, "Random", each { Number.Random(), _ }{ 0 })
参考
以下の記事をみても、昔は、特に問題なかった様子
あとがき
ちゃんと勉強していかないとこういう時に困っちゃうけど、情報交換出来る仲間や相手がいると解決せず放置、にならなくてありがたいなぁと改めて思いました。
会社で如何に情報共有の仕組みを作るかって大切ですね。