LoginSignup
0
0

More than 3 years have passed since last update.

細かすぎて伝わらないLookerTips

Posted at

これはなに

単体で記事にするほどではないが地味に詰まった課題を解決した際のTipsを書き残したもの。随時更新。
もっと良いやり方があれば教えて欲しい。

Table Visualizationで複数列をキーにしたソートをしたい

まずは第一キーの列名をクリックしてソートしたあと、シフトを押しながら第二キーにしたい列名をクリックする
(ChatSupportで聞いたらPieterが一瞬で解決してくれた)

日次累計を集計した際、未来の数字がずっと同じ値で出てしまう

now()とdate dimensionの比較を行い、超えた分についてはnullを返す式を作ってあげる

if(${daily_hoge.day_month}=trunc_months(now()),
    if(
        diff_days(date(extract_years(${daily_hoge.day_month}),extract_months(${daily_hoge.day_month}),${daily_hoge.day_day_of_month}),now())>=1,
        running_total(${daily_hoge.number_of_hoge}),
        null
    ),
    running_total(${daily_hoge.number_of_hoge})
)
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