From the course: Tableau 10: Mastering Calculations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Count table rows from first or last row

Count table rows from first or last row - Tableau Tutorial

From the course: Tableau 10: Mastering Calculations

Start my 1-month free trial

Count table rows from first or last row

- [Instructor] In the previous movie, I showed you how to display the number of the table row in which a record appears. In this movie, I'll show you how to make a couple of related calculations, how far from the first or last row a record appears. My sample file is FirstAndLast and you can find it in the Chapter07 folder of the exercise files collection. I have a series of order data. Although I haven't filled in the total of the order values. Instead, what I'd like to focus on is discovering or displaying the number of rows that a particular row is from either the first or the last row in the table. To do that, I will create a calculated field. So I'll go to the Analysis menu and click Create Calculated Field. I'll name the calculation Distance. That way I don't have to change the name when I go from first to last. And I'll press Tab. I will start with the FIRST function. The FIRST function tells you how many rows you are from the first row in the table. Specifically, it does the…

Contents