Level 3CapstonesProject, 12 min

Capstone: a KPI dashboard from a raw export

The task

Every Monday the ad platforms dump a raw export onto the Export tab: one row per channel per week. Build the Dashboard tab so it rebuilds itself whenever a new export lands: totals, KPI tiles, a channel table and a weekly trend.
  1. Totals with BYCOLOn Dashboard, in B2, total all four metric columns of the export in one formula: =BYCOL(Export!C2:F17, LAMBDA(column, SUM(column))).
  2. KPI tiles with HSTACKIn B5, build the three KPI tiles side by side with HSTACK: ROAS (revenue / spend), CPA (spend / conversions) and conversion rate (conversions / clicks), all from the totals in row 2.
  3. The channel tableIn A7, summarize spend and revenue by channel, best revenue first: =QUERY(Export!A1:F17, "select B, sum(C), sum(F) group by B order by sum(F) desc label sum(C) 'Spend', sum(F) 'Revenue'")
  4. ROAS per channelIn D8, divide each channel's revenue by its spend, for all four rows of the table, with MAP. Return 0 if spend is 0 so a new channel can't break it.
  5. Weekly revenue trendIn A14, total revenue by week, oldest first, ready for a line chart: =QUERY(Export!A1:F17, "select A, sum(F) group by A order by A label sum(F) 'Revenue'")

The data, 2 tabs

The starting sheet. Cells outlined in green are where your formulas go.

Dashboard tab
ABCDE
1SpendClicksConversionsRevenue
2Total
3
4ROASCPAConv. rate
5KPIs
6
7ROAS
8
9
10
11
12
13
14
15
16
17
18
19
Export tab
ABCDEF
1WeekChannelSpendClicksConversionsRevenue
2Sep 7Paid Search$3,200184092$13,800
3Sep 7Paid Social$2,800265061$7,300
4Sep 7Email$40092048$5,760
5Sep 7Display$1,5006109$1,080
6Sep 14Paid Search$3,350191097$14,650
7Sep 14Paid Social$2,950281066$7,900
8Sep 14Email$40088045$5,400
9Sep 14Display$1,5005808$960
10Sep 21Paid Search$3,100179588$13,200
11Sep 21Paid Social$3,100299058$6,950
12Sep 21Email$450101055$6,600
13Sep 21Display$1,4005457$840
14Sep 28Paid Search$3,5002020104$15,900
15Sep 28Paid Social$3,000287070$8,400
16Sep 28Email$40094051$6,120
17Sep 28Display$1,60065011$1,320