
Not applicable
2011-08-17
06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
最大値を条件に抽出する方法
適当なタイトルを思いつかなかったので、このようにしています。
以下のようなテーブルがあったとします。
Day | ID | SeqNo |
---|---|---|
1 | 1 | 1 |
1 | 1 | 2 |
1 | 2 | 1 |
1 | 2 | 2 |
2 | 3 | 1 |
2 | 4 | 1 |
ID毎にSeqNoが1から順番に振られているテーブルです。
ここから、SeqNo>1 を持つIDのカウントを取得したいのですが、方法がわかりません。
期待する結果は以下の通りとなります。
Day | Count |
---|---|
1 | 4 |
2 | 0 |
Sum(if(Max(total<ID> SeqNo)>1, count(total<ID> SeqNo), 0))
このようにしてみましたが、だめでした。
よろしくお願いいたします。
1,575 Views
1 Solution
Accepted Solutions

Not applicable
2011-08-21
11:58 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
数式は以下でいけます。
count({ <SeqNo={"=SeqNo>1"}>} ID)
ただ、0が表示されないので
数式count(ID)を追加して、プレゼンテーションでcount(ID)を列の非表示にする必要があります。
1,460 Views
6 Replies

Not applicable
2011-08-21
10:25 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
質問なのですが、seqNo>1のCountなのでDayの1の結果は2ではないのですか?
1,460 Views

Not applicable
2011-08-21
11:22 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tigerdragon さん
ご指摘ありがとうございます。
まったくその通りです。
失礼いたしました。
訂正します。
期待値は、以下の通りとなります。
Day | Count |
---|---|
1 | 2 |
2 | 0 |
よろしくお願いいたします。
1,460 Views

Not applicable
2011-08-21
11:58 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
数式は以下でいけます。
count({ <SeqNo={"=SeqNo>1"}>} ID)
ただ、0が表示されないので
数式count(ID)を追加して、プレゼンテーションでcount(ID)を列の非表示にする必要があります。
1,461 Views

Not applicable
2011-08-22
11:25 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ありがとうございました。
ただ、中括弧{}の使用方法が良くわかっていません。
ヘルプのどのあたりに詳しくのっていますでしょうか。
よろしくお願いいたします。
1,460 Views

Not applicable
2011-08-23
04:00 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
キーワード検索で「SET分析」と検索するとSET分析という項目が出てきます。
ここにサンプルも載っていますので参考にしてください。

Not applicable
2011-08-24
12:32 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ありがとうございました。
大変参考になりました。
1,460 Views
