The Tag Transform allows you to categorize data based on criteria you select from the data you've imported. The Tag Transform will create a new column with the tag names you've created.
How to Use
Find the Tag Transform by selecting the +Add Transform button in Edit Metric.
You can then name the column you want your tags to fall under and add your tags.
Let's say I'm in E-commerce and I have a list of transactions from my online store that I want to categorize by purchase type. I've defined these types as
- Large Purchase (over $200)
- Regular Purchase (over $75 up to and including $200)
- Small Purchase ($75 or less)
Starting with my raw data table, I know that I need to categorize my Purchase column.
So I open the Tag Transform and name my column Purchase Type. I add my tags and create the logic. Below is an example of my tag Small Purchase.
I can also have combinations of AND/OR logic. In this example, my Regular Purchase tag needs a combination of logic to ensure I capture purchases over $75 AND purchases of $200 or less.
Once I have all my tags in place. I can use other transforms on the new column I have created. For this example, I want to know how much is being sold by category in terms of total purchase amount. So, I group my data by my new column Purchase Type and Sum the Purchase amount:
I can now chart off of the summarized data:
Success! In just a short amount of time, I was able to define categories and their criteria, group off of them, and get the insight I needed.
For those familiar with SQL Case Statements, this transform is essentially a way to accomplish the basic functionality without actually writing SQL!
Using Saved Tags
If you need to make many metrics with the same tags using the same logic, you can use Saved Tags to save a lot of time.
Let's say for example your sales report includes a card type, but they don't include what region that card is from. You set up a few logic statements to categorize cards as from the US, International, or Unknown.
Now you want to re-use this classification in another metric that has similar or the same data.
Click the Tag Transform and look to the bottom of the window and click 'Saved Tag Library'.
Each set of tags you create is automatically presented so you can reuse it.
Scroll down to find the set of tags you just created. You have two options.
'Select' or 'Use a Copy'
Choosing select means that you are using the same set of tags as the first metric. Changes to one will affect the other.
If you want to use the set of tags as a starting point but make changes independent from the other metric, instead click 'Use as template'.
Use as template
Picking use as template will make an independent copy of the tags that you can edit without fear of changing the other metrics that used those tags.
Note: When you duplicate a report, metric, or dashboard that is using the Tag transform, the new duplicated metric will be using the Saved Tags, so changing the tag settings in one metric will reflect on the others.
This is communicated with a banner like the one below.
This is only impactful if you are editing the tags, so that is where this information is shown. If you don't want to modify the original metric, just click 'Use a copy instead' and you will get an independent copy of the tags that you can edit.