Help us understand the problem. What is going on with this article?

Einstein Analyticsでパレート図を作る

More than 1 year has passed since last update.

グラフの種類を「コンボ」にして、以下のような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;
haneco
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away