Aggregate campaign cost using REGEXMATCH
The digital marketing director was so impressed with the speed at which you got the filtered campaigns to them that they decided to give you another task. This time, they are asking on behalf of the client for a quick rundown of the total spend for both the DataCamp Brand
and Python Brand
campaign.
Once again, FILTER()
combined with REGEXMATCH()
is the answer, but not the full answer. In this exercise, you will need to also apply a SUM()
function in order to aggregate the total spend (Cost
) of the two campaigns of interest.
This exercise is part of the course
Marketing Analytics in Google Sheets
Exercise instructions
- Add a regular expression in cell
H4
that will match the respective campaign listed in the cellG4
(i.e. Python campaigns). - In cell
I4
, write a filter for theCost
column, with the condition for the filter using the regex in cellH4
. Don't forget to useREGEXMATCH()
! - Wrap the filter with a
SUM()
to find the total cost for theDataCamp Brand
campaign.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
