Table:
0
A
B
C
D
1
document id
draft number
copy number
draft copies
2
2
8
5
3
4
9
6
4
23
9
15
5
10
20
10
6
2
1
4
7
1
2
5
8
20
17
15
9
12
12
10

Questions and formulas:
Question: the total draft copies of No.2 document.
Formula: ROWS(UNIQUE(FILTER(D1, A1=2)))
Formula2: ROWS(UNIQUE(FILTER(D2:D9, A2:A9=2)))
Level: medium
Question: Which document has the most draft copies?
Formula: TAKE(SORT(SUMMARIZE(A1,DCOUNTX(D1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(A2:A9,DCOUNTX(D2:D9)), 2, -1), 1)
Level: hard
Question: How many draft copies are there for documents with more than one copy and?
Formula: LET(query1,SUMMARIZE(A1,DCOUNTX(D1),SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,3)>1))
Formula2: LET(query1,SUMMARIZE(A2:A9,DCOUNTX(D2:D9),SUMX(C2:C9)),FILTER(query1,CHOOSECOLS(query1,3)>1))
Level: hard
Question: The document with the most draft copies.
Formula: TAKE(SORT(SUMMARIZE(A1,DCOUNTX(D1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(A2:A9,DCOUNTX(D2:D9)), 2, -1), 1)
Level: hard
Question: How many draft copies for documents with more than one copy?
Formula: LET(query1,SUMMARIZE(A1,DCOUNTX(D1),SUMX(C1)),FILTER(query1,CHOOSECOLS(query1,3)>1))
Formula2: LET(query1,SUMMARIZE(A2:A9,DCOUNTX(D2:D9),SUMX(C2:C9)),FILTER(query1,CHOOSECOLS(query1,3)>1))
Level: hard