Just a crazy thought, but you could convert the date to numeric, or create a separate numeric field, and then create the field. It would definitely be a measure if you did that.
2 of 2 people found this helpful
You'll have to just create a separate field. Tableau will let you convert a string field to a measure but not a date.
The easiest way to answer a question like this is to build it in the Tableau UI and save the TDS file and see what Tableau generated.
So I should do something like this -
1. Create an expression over my Date type column with Distinct count function, something like -
Now above expression can be used as measure to drag dist_count of date on viewer.
2. I should make my date column as hidden column, so it won't be visible but can be used in expressions.
I wish there would be a one step solution which simply would let me create dist_count measure over Date type.