3 Replies Latest reply on Feb 12, 2019 11:17 PM by Rahul khandelwal

    How to create count measure over date datatype column in TDS file.

    Rahul khandelwal

      We are creating TDS file programatically.

       

      We are defining measures/dimensions over columns in TDS file.

      But when we try to expose a count(distinct) measure on Date type column, Tableau moves the measure in dimension pane.

      Afterwards Tableau does not treat that column as measure rather it treats it as a dimension.

       

      Following is the TDS definition for the measure we are trying to expose -

      <column aggregation='CountD' caption='OrderDate_CountD' datatype='date' name='[orderdate_countd]' role='measure' type='quantitative' />

       

      Tableau moves above mentioned "OrderDate_CountD" column to dimensions and TDS generated from Tableau after this is as follows -

      <column aggregation='None' caption='OrderDate_CountD' datatype='date' name='[orderdate_countd]' role='dimension' type='ordinal' />

       

      Can someone please let me know how can I expose a count/distinct count measure over date type column in TDS file.

       

      Thanks.