Table:
0
A
B
C
D
E
1
hh id
shop id
month
num of shaff in charge
happy hour
2
1
1
May
10
3
2
1
April
12
4
3
10
June
15
5
4
5
July
5
6
5
1
May
10
7
6
1
April
12
8
7
2
June
5
9
8
3
July
15
10
9
3
May
3
11
10
3
April
4

Questions and formulas:
Question: Which month has the most happy hours?
Formula: TAKE(SORT(SUMMARIZE(C1,DCOUNTX(E1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,DCOUNTX(E2:E11)), 2, -1), 1)
Level: hard
Question: Which months have more than 2 happy hours?
Formula: LET(query1,SUMMARIZE(C1,DCOUNTX(E1)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Formula2: LET(query1,SUMMARIZE(C2:C11,DCOUNTX(E2:E11)),FILTER(query1,CHOOSECOLS(query1,3)>2))
Level: hard
Question: The month with the most hours of happiness
Formula: TAKE(SORT(UNIQUE(HSTACK(C1,E1)), 2, -1), 1)
Formula2: TAKE(SORT(UNIQUE(HSTACK(C2:C11,E2:E11)), 2, -1), 1)
Level: hard
Question: The month with the most happy hours.
Formula: TAKE(SORT(SUMMARIZE(C1,DCOUNTX(E1)), 2, -1), 1)
Formula2: TAKE(SORT(SUMMARIZE(C2:C11,DCOUNTX(E2:E11)), 2, -1), 1)
Level: hard