Table:
0
A
B
C
D
1
document id
location code
date in location from
date in locaton to
2
7
e
1/6/2017 23:17
6/8/2008 12:45
3
11
x
1/6/2017 23:17
7/3/2012 9:48
4
81
c
3/31/1972 9:47
11/5/1987 6:11
5
81
c
1/6/2017 23:17
11/26/2010 19:22
6
81
x
6/8/2008 12:45
6/15/1976 3:40
7
111
x
10/14/1986 17:53
11/26/2010 19:22
8
119
b
1/6/2017 23:17
1/1/1995 3:52
9
166
b
5/13/1985 12:19
10/14/1986 17:53
10
166
b
10/14/1986 17:53
11/26/2010 19:22
11
170
x
3/10/1997 15:24
6/15/1976 3:40
12
230
e
3/31/1972 9:47
11/5/1987 6:11
13
230
e
11/26/2010 19:22
1/6/2017 23:17
14
252
n
1/6/2017 23:17
3/10/1997 15:24
15
252
x
3/31/1972 9:47
8/18/2009 3:29
16
260
e
8/18/2009 3:29
10/14/1986 17:53

Questions and formulas:
Question: All location codes and documents.
Formula: UNIQUE(HSTACK(B1,A1))
Formula2: UNIQUE(HSTACK(B2:B16,A2:A16))
Level: easy
Question: What are the location codes and documents?
Formula: UNIQUE(HSTACK(B1,A1))
Formula2: UNIQUE(HSTACK(B2:B16,A2:A16))
Level: easy
Question: How many documents are there per location?
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B16,SUMX(A2:A16))
Level: easy
Question: The number of documents in each location.
Formula: SUMMARIZE(B1,SUMX(A1))
Formula2: SUMMARIZE(B2:B16,SUMX(A2:A16))
Level: easy
Question: The location with the most documents.
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: Which location code has the most documents?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: Which locations have at least 3 documents?
Formula: LET(query1,SUMMARIZE(B1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Formula2: LET(query1,SUMMARIZE(B2:B16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Level: hard
Question: Locations with 3 or more documents.
Formula: LET(query1,SUMMARIZE(B1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Formula2: LET(query1,SUMMARIZE(B2:B16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Level: hard
Question: The location codes and documents.
Formula: UNIQUE(HSTACK(B1,A1))
Formula2: UNIQUE(HSTACK(B2:B16,A2:A16))
Level: easy
Question: How many documents in different locations?
Formula: SUMMARIZE(B1,DCOUNTX(A1))
Formula2: SUMMARIZE(B2:B16,DCOUNTX(A2:A16))
Level: easy
Question: What is the location code with the most documents?
Formula: TAKE(SORT(SUMMARIZE(B1,SUMX(A1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(B2:B16,SUMX(A2:A16)), 2, -1), 1)
Level: hard
Question: What is the location code with no less than 3 documents?
Formula: LET(query1,SUMMARIZE(B1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Formula2: LET(query1,SUMMARIZE(B2:B16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Level: hard
Question: The location code with at least 3 documents.
Formula: LET(query1,SUMMARIZE(B1,SUMX(A1)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Formula2: LET(query1,SUMMARIZE(B2:B16,SUMX(A2:A16)),FILTER(query1,CHOOSECOLS(query1,3)>=3))
Level: hard