Better Programming

Advice for programmers.

Follow publication

3 Ways to Use Index() in Tableau

index() function use case

Indhumathy Chelliah
Better Programming
Published in
4 min readMay 13, 2022

Photo by Nothing Ahead from Pexels

In tableau, index() function is one of the most important function. Let’s learn about the 3 use cases of index() function in this article.

  1. How to create a well-formatted tabular data view in tableau using index() function?
  2. How to de-identify any column names using index() function?
  3. How to create Top-N / Bottom N filter using index() function?

1. How to create a well-formatted tabular data view in tableau using index() function?

In tableau when we create a text table, we will get merged cells.

Here view breaks down by Category and Subcategory. But if you want to have an individual row for each record, it can be done by using index() function.

Create a calculated field:

index()

Now convert this calculated field index to discrete. Now place this in the first position on the rows shelf.

Now we get an individual row for each record. You can download my workbook from here.

2. How to de-identify subcategories using the index() function?

Suppose we have a use case that has to hide the subcategories name in our view.

What needs to be done?

  1. If we select a subcategory in the filter, then that subcategory name alone should be displayed in the view. The remaining other subcategories should be displayed as Product 1, Product 2, etc. The remaining subcategories should be deidentified.
Without hiding the subcategory name

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Indhumathy Chelliah
Indhumathy Chelliah

Written by Indhumathy Chelliah

Machine Learning | Python |R | Tableau | 1.5 M Views

No responses yet

Write a response