New Rows...What Does It Do?

You may wonder, why does Tableau Prep has a new rows function when you can easily add as many rows as you can in a data source. The function Tableau Prep offered is specifically targeting sequential data. It works for number (whole) and date. Have you ever come across a list of dates but there is just that one to two missing in between? That's when you can use new rows.

You can find new rows in the add step drop down. In this blog, I am only going to cover new rows using value from one field. If you want to know how to use it with value ranges from two fields, you can head over to Edward Hayter's blog which would go in depth into it. You can find the link to his blog below.

The Data School - How to add rows in Tableau Prep

After clicking new rows, the system will ask you to choose a field that you want to add rows to. Remember, the data type of the field has to be either number (whole) or date. The example I am using here is a list of active gym member ID, and the objective of this preparation is to find out how many customers had their accounts deactivated. As we only have the account IDs of the active members, we need to add back the deactivated IDs to compare the two.

There are a couple of things to pay attention to before generating the new list. You can choose to have the new rows updated on the existing field or to create a new field. The value increment and content for the new rows can also be specified. As I only need the numbers of deactivated accounts, I chose null for the content.

Here is the preview of the new list, as you can see, 33 rows are added to the existing list, filled with null.

With the new rows, I can now generate the numbers of deactivated accounts which are 33.

I hope you find this demonstration helpful. Feel free to contact me on LinkedIn or Twitter if you have any questions regarding to this topic.

Author:
Karina Chan
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab