The DataSource interface window allows users to transform their fields in values with a myriad of operations,
there are two main types of operations field operations and value operations.
Field operations include field types and geographic roles by selecting the field type icon in the data
grid.
You can change the type directly by selecting it.
Field types are important as they impact filtering, aggregation, visualization type and data grouping.
Options for field types include no decimal, no hole, date and time, date, string and boolean.
Geographic roles control how geospatial fields are presented within visualisations.
These roles are automatically assigned when data types and values reflect common geographic roles such
as city, state, country and more.
But you can always force a geographic roll from this menu directly if it isn't signed automatically.
In addition to field operations, you can also perform value operations for your operations include
a few different options.
The rename operation will allow you to change the field name within the workbook.
You can also do so just by double clicking the header and typing in a new name.
Note that this won't impact your name in your back end data source only in your workbook.
The height operation will remove any unneeded columns from your data source.
Again, fields are only hidden in Tableau and not in the raw source.
The grouping operation will grouped values together and create a new field.
This is similar to the aliased function, which renames an individual value but allows for multiple
values to be grouped together.
The pivot operation works when selecting a single or multiple fields that will change from columns to
rows.
If you want to group your measure values into a single column, you can select those columns and then
choose to pivot them.
This operation will allow you to split values from a field using delimiters.
The automatic split option will find and use the delimiter on its own.
But you can always use custom split to be specific about which telemeters you're choosing to use.
This will automatically generate a calculated field.
Applying the split function notes the calculated fields will be discussed in depth in a later section.
Now that we've talked about transforming data at a high level, let's take a look at these functions
inside or Tableau workbook.
All right, so we're back in Tableau desktop and we're in our main workbook.
The first thing we're going to do is go over to our card charges source.
Right.
Click and edit our data source.
Now that we're in our data window, we can start transforming some of our data.
First up, let's try out the rename operation.
I'm going to go to my dropdown of my value column and choose rename instead of value.
I would like to call this column spend, so I'm going to type in spend and click enter.
Now let's try and hide a field that we won't need.
I'm going to go over to my row, ID, choose the dropdown and select hyd because we won't need that
field.
Now let's test out our group operation.
I'm going to go over to subcategory, choose my dropdown and say create group inside my group window.
I'm going to go ahead and choose alcohol and combine that with the tobacco value.
I'll just use control, click to select them both and I'll choose group.
You'll see that they're grouped with a paper clip icon and they're combined in my view.
Now click OK, and my data has been changed.
You'll note that my data hasn't been changed in the original column, but I've got a new column here
that's specified as a group.
You can also see that alcohol and tobacco has taken the place of alcohol for this specific line.
Next up, let's test out an alias.
We'll go to our original subcategory field, choose the dropdown and select aliases Inciter Alias.
We'll note that we have our original field on the left hand side and our alias on the right.
I'm going to double click into where it says saving and I'm just going to add an S to call this saving's.
You'll note that there's a little asterisks now on this particular line that denotes that this has been
an alias that has been applied to the specific value.
I'll go ahead and click, OK?
And our alias will be applied next.
I'm going to create a very basic, calculated field note that will go through calculated fields in more
depth.
But we want to demo the calculated field option up front in the data window.
To do this, I'll go to my spin field, choose my dropdown and say create calculated field.
I'm going to call this calculated field essential spend.
And for my calculation, I'm going to perform an IF statement.
So I'm going to say if the category and I can just start typing and it will fill in the value for me,
I can just hit enter when it's the field that I want equals essential, then spend else zero end.
Now we'll talk a bit more about logical calculations in the next section.
But for now you should just know that this calculation is essentially looking at the category field,
checking if the category is essential and then only presenting the Spen field.
When that's true, when that's false, it will just give a zero value.
So now we have an independent column that's just aggregating our essential spend no matter what.
We'll jus OK and we'll see that our field will be added to our view.
Now our data doesn't really need a pivot, but we can test out what a pivot would look like if we wanted
to transpose some of our fields.
Let's go ahead and choose transaction date and clear date.
Right.
Click and choose Pivot.
Now, what this has done is transpose our dates into a specific column.
All of our dates are included in this pivot field values column.
And then we've got the description of the date in our Pivot Field Names column.
We would rename these fields if we were going to use these going forward, but for now we can just use
undo because we won't need a pivoted value in this specific table.
Finally, let's test out our split operation.
I'll go over to my transaction ID because I notice the delimiter in this field.
Let's go ahead and hit the dropdown and just choose split.
This will automatically blow out or fields based on dargah limiter.
You can see if we scroll over all the way to the right, we've got three new fields based on the original,
which had two telemeters in it.
Let's go ahead and rename our first field that we split out.
I'll just double click and I'll call this country abbreviation.
The other two fields won't be needed.
So I'll click, choose shift, select both fields right.
Click and hide.
Now we've got the field that we needed using our split.
One final note is that you can do a lot of these operations inside your metadata grid, which is located
here, but you won't be able to see a preview of the data as you're performing your operations.
That's why our data pain is very useful while performing operations, because we get a preview of what
our data will look like.
Let's go ahead and go back to sheet one and we'll save our workbook.
Up next, we'll be talking through the difference between life connections and extracts.