6 Replies Latest reply on Jan 26, 2017 7:10 AM by Ignas van den Einde

    Problem Plotting DATEDIFF against Age

    Allen Gapara

      Please, I am stuck again. I am getting wrong results when plotting a line chart, Age against DATEDIFF('day',DATE(ATTR([A].[Enquiry Created])),DATE(ATTR([A].[Payment Made]))). I am using blended SQL data sources on different Servers. I have tried the other combinations as well.


      DATEDIFF('day',DATE(MIN([A].[Enquiry Created])),DATE(MIN([A].[Payment Made])))

      DATEDIFF('day',DATE(MAX([A].[Enquiry Created])),DATE(MAX([A].[Payment Made])))

      DATEDIFF('day',DATE(MIN([A].[Enquiry Created])),DATE(MAX([A].[Payment Made])))

      DATEDIFF('day',DATE(MAX([A].[Enquiry Created])),DATE(MIN([A].[Payment Made])))


      I am getting different results. Now I do not the right combination to use. I would like to use the average period plotted against the Age.


      The other problem is, when I remove Enquiry created and Payment Date form the view, the datediff calculation gives zero result. I only need datediff against age not any of the dates. I tried keeping payment date in detail and I do not know why I should do that.


      Please note. I have removed same day payments. I am using Tableau 9.3 and have enclosed the workbook.


      Your help would be greatly appreciated.