1 Reply Latest reply on Oct 13, 2018 12:43 AM by Ombir Rathee

    Dynamic Date Format

    Ombir Rathee

      Hi Friends,


      I am trying to make a dynamic date filter based on Frequency i.e Daily, Monthly, Quarterly




      If Daily then format in Filter Drop Down should be like "mmm dd yy"

      If Monthly then format in Filter Drop Down should be "mmm yy"

      If quarterly then format should be "Q "+quarter+yy


      I am able to achieve this with a calculated field using string functions but as calculated field is a string therefore values in filter drop down are not sorted in Chronological order. They are coming in alphabetical order due to string.


      Attached workbook with sample data. I am using Published data source as backend which is based on hadoop, therefore few date functions are not available like dateparse,makedate etc.

      Further due to some bug with Hadoop and Tableau, DateName also returns numerical value for months instead of Month Name. To cater this I created another calculated field with Case statement.


      Please help with some workaround for the sorting issue in filter dropdown.