Transform field per line data with Tableau Prep (2)

A couple of weeks ago I wrote about a Tableau Prep approach to transposing data from a text file that had a field per line, with another line separating records. At the time I noted that the approach wasn’t robust enough to handle optional fields, and that it would be annoying to need a join per field in cases where you had a large number of fields. In this follow up post I look at an alternative that doesn’t have those drawbacks. ...

March 9, 2024 · 4 min · Steve

Tableau Prep and #PreppinData 2024 week 9

Finishing #PreppinData intermediate-level month with a 1-step solution … fun, but definitely harder and less easy to maintain!

March 4, 2024 · 1 min · Steve

One-step Tableau Prep solutions

This quarter I set myself the goal to learn more about Tableau Prep, and a key part of that has been participating in the weekly #PreppinData challenges. Something I’ve noticed, and have been super intrigued about, is that some participants have been posting one-step solutions. That wasn’t surprising during beginner month, but now I’m seeing one-step flows covering reasonably complex multi-step data transformations. Cool! This week I took a deeper dive into one of those one-step solutions to learn, and share, how they’re being done. ...

February 25, 2024 · 5 min · Steve

Transform field per line data with Tableau Prep (1)

I recently answered a question on the Tableau Community Forums about transposing data from a text file that had a field per line, with a line of dashes separating records. I’m not sure what the formal name for this format is, but there are similarities with RecFiles. Here is an example: I don’t know of a way to use data formated like that directly in Tableau Desktop. But we can use Tableau Prep to transform it into a more natural row per record format! ...

February 25, 2024 · 3 min · Steve

Tableau Prep and #PreppinData 2024 week 8

#PreppinData 2024 week 8 – a “what if?” analysis of two different customer loyalty reward systems for Prep Air. Aiming to identify cost and number of customers benefiting. The “estimated yearly flights” calculation tripped me up for a while, out thinking it with a datediff on days, and only when the flights spanned more than a year. The challenge just required a division by the number of years flown over! I enjoyed expanding the data set throughout the flow (pivoting the benefits, joining onto cost per benefit, and then joining onto those tiers less then or equal to each customer’s tier) to then roll back up at the end. ...

February 24, 2024 · 1 min · Steve

Tableau Prep and #PreppinData 2024 week 7

#PreppinData 2024 wek 7:

February 19, 2024 · 1 min · Steve

Tableau Prep and #PreppinData 2024 week 6

The #PreppinData 2024 week 6 challenge was to find the latest salary per staff member and summarise their tax position given UK income tax bands. We’re now into intermediary level challenges and so there are less prescriptive steps, and more options to solve the problem your way. For me the problem had two key parts: (1) get the latest row per staff member; and (2) the various calculations for salary and tax paid based on tax bands. ...

February 11, 2024 · 1 min · Steve

Tableau Prep and #PreppinData 2024 week 5

The final week of beginner month for #PreppinData involved a bit more complexity around joins, calculations and outputs. On top of Tableau’s getting started tutorial #PreppinData has been a great way to get into Tableau Prep. I’ve invested about 12-15 hours of time and feel like I’ve got a good initial grasp of the product. The challenge walk through provided less info on the “how”, which in some ways was quite nice as I felt more license to solve the problem my way. On the other hand I wonder if I should have made my flow less complex instead of aiming for one data set that could then be filtered down to the different outputs. ...

February 6, 2024 · 1 min · Steve

Tableau Prep and #PreppinData 2024 week 4

#PreppinData 2024 week covered using join types, in this case to understand which seats aren’t chosen given a seating plan and booking data. I had a preconceived idea of the solution here, as I’m used to using LEFT OUTER JOIN in SQL and then having a WHERE clause that returns rows where the result from the right hand table IS NULL. So I was expecting to have a join and then a filter in my flow. However, Tableau Prep has some additional join types that let you return entries where there are only values in the left table, only values in the right table, or even a “not inner” join for entries only in the left or right but not in both. I gave the left only option a go and it did the job nicely! Great how you can click on the segment of the venn diagram representation of the join to select the type too. ...

January 28, 2024 · 1 min · Steve

Tableau Prep and #PreppinData 2024 week 3

Two lots of Tableau Prep practice this week. A forum question (see end of post) and #PreppinData 2024 week 3. The challenge for #PreppinData was to join targets from a spreadsheet, with a sheet per quarter, to our previous sales figures. And then to calculate difference from target. Similar union and clean up steps to previous challenges to get to the point where there are two data sets to join, and where we have consistent fields in both (first letter of class, and a month number). Then the join is pretty straightforward: ...

January 22, 2024 · 2 min · Steve