Clean Up Your CRM Reports With This Easy Case Statement

It can be a bit of a struggle when you look at your CRM reports because over time sources were named differently.

In this case, AutoTrader was labeled 4 different ways. Just one capitol letter can make it harder to read.

I encourage you to start adding this data to your Data Studio reports because it will be very easy to study your leads back in time with the date toggle.

In this case we added the data to a Google Sheet, and pull that into Google Data Studio.


This example is showing just AutoTrader and You may have many other vendors listed more than once, so it makes the source report noisy.


The original source of the Google Sheet was “Source”, so I made a new one with the following case statement in Data Studio:

WHEN REGEXP_MATCH(Source,".*autotrader.*|.*Autotrader.*|.*AutoTrader.*") THEN "AutoTrader"
WHEN REGEXP_MATCH(Source,".*Cars\\.com.*") THEN ""
ELSE Source

It’s that easy, just copy and paste above. This will make your your job so much easier, and the original data will always be there for checks and balances. Notice I had to comment out a period? Sometimes Data Studio requires a double \\ before regex characters.