LoginSignup
2
2

More than 5 years have passed since last update.

Einstein Analyticsでパレート図を作る

Posted at

グラフの種類を「コンボ」にして、以下のようなSAQLを書くとパレート図になる。

q = load "Column3";
q = group q by 'グループ項目名';
q = foreach q generate
        'グループ項目名',
        count() as '集計値',
        sum(count()) over([..] partition by all) as '合計',
        coalesce(sum(count()) over([.. -1] partition by all order by count() desc), 0) as '累積値';
q = foreach q generate
        'グループ項目名',
        '集計値',
        ('累積値' + '集計値') / ('合計' + '合計') * 2 * 100 as '比率の累計';
q = order q by '集計値' desc;
q = limit q 2000;
2
2
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
2
2