Table:
0
A
B
C
D
1
document id
budget type code
document details
documents with expenses
2
57
GV
government
3
192
GV
government
4
226
GV
government
5
227
GV
government
6
240
GV
government
7
300
GV
government
8
309
SF
safety
9
367
SF
safety
10
371
ORG
organization
11
383
ORG
organization

Questions and formulas:
Question: How many documents have expenses?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D11))
Level: easy
Question: How many documents have expenses?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D11))
Level: easy
Question:  'sf' budget document id.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="sf"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D11,B2:B11="sf"),1))
Level: medium
Question: What is the number of documents drafted for each budget?
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B11,SUMX(A2:A11))
Level: easy
Question: Which budget has drafted most documents?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,SUMX(A2:A11)), 2, -1), 1)
Level: hard
Question: Which budget type is most common?
Formula: TAKE(SORT(SUMMARIZE(B1,COUNTX(B1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,COUNTX(B2:B11)), 2, -1), 1)
Level: hard
Question: What is the number of documents with expenses?
Formula: ROWS(UNIQUE(D1))
Formula2: ROWS(UNIQUE(D2:D11))
Level: easy
Question: id for 'sf' budget document.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="sf"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D11,B2:B11="sf"),1))
Level: medium
Question: The most common budget type.
Formula: TAKE(SORT(SUMMARIZE(B1,COUNTX(B1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B11,COUNTX(B2:B11)), 2, -1), 1)
Level: hard