6 Replies Latest reply on Dec 16, 2016 9:02 PM by Joe Oppelt

# How to count dates from min to max

Hi there, I ve been trying all day doing this but I still havent got it, can you help me to count this dates , I have the next dates

And I want a calculate field to organize them like this

from the early one to the last one, how can I do that??  thanks for ur help

• ###### 1. Re: How to count dates from min to max

Create this calc:

[index]

This is all it will have in the calc:

INDEX()

Now add that to your sheet.  This is a table calc, so you may need to tell tableau to compute using TABLE(down).  You do that on the pill that puts it on your sheet.

In the attached (version 8.2) workbook I had demonstrated this for someone.  On sheet 1, the index calc is running table(across) and you can see that the numbers increase across the row, for each row.

In sheet 2 it's TABLE(down).  Sheet 3 is table(across then down).  Sheets 4 and 5 are doing advanced stuff that you probably don't need to mess with for what you are looking to do.

• ###### 2. Re: How to count dates from min to max

PS:  The pill for this example is on the text shelf.

• ###### 3. Re: How to count dates from min to max

thanks for your help I am ussing it in a map, and when I use the index is not working, there is no other way ? cuz I have this and when I use index only appear 1, I am also attaching a workbook, you can see by the color which one of the dates is first and which one is the last one

• ###### 4. Re: How to count dates from min to max

See attached.

In this case I told it to run along the time dimension.

• ###### 5. Re: How to count dates from min to max

Thanks that is, but why there is not number 4 and 5??

• ###### 6. Re: How to count dates from min to max

I changed things so that colors are set by INDEX.

4 and 5 sit in exactly the same location as 2.  Click on the index values in the legend to see that.