====== How to rename medium or other columns ====== Sometimes the medium column needs to be renamed because the revenue and the spend do not match. Here we see an example for snapcht. {{:advanced_transformations:medium_for_snapchat_not_matching.png?1000|}} 1. For this we need to rename the column so we click "Explore data" {{:advanced_transformations:2021-09-01_11-17.png?1000|}} 2. Then we click "Edit dataset" {{:advanced_transformations:2021-09-01_11-21.png?1000|}} 3. Then we click "Calculated Columns" and edit the case statement for Medium {{:advanced_transformations:2021-09-01_11-25.png?1000|}} In this case we add the rule for snapchat: WHEN source='snapchat' THEN 'paid_social' So the whole Expressions looks like: Case when (source='facebook' and (medium='cpc' OR medium='Unknown')) THEN 'paid_social' WHEN source='criteo' THEN 'retargeting' WHEN (medium='Unknown' AND totalcost > 0) THEN 'cpc' WHEN source='snapchat' THEN 'paid_social' ELSE medium END 4. Then we save and re-run the query and make sure its not coming from cache and then we have spend and revenue for snapchat on the same row and a multi-touch attributed ROAS. {{:advanced_transformations:2021-09-01_11-31.png?1000|}}