3 Replies Latest reply on Jul 5, 2018 8:37 AM by Kelden Smith

    COUNTD LOD Expression Issue with DATEADD Function

    Kelden Smith

      Hi All,


      I was wondering if someone could check this LOD calculation.


      Order Date is the Date in the Database and Start Date/End Date are the parameters for date inputted by the user

      This calculation gives my expected result of the prior month's COUNTD of CustomerID:


      {FIXED [Zip Code], [Order Date]>=DATEADD('month',-1,[Start Date]),[Order Date]<=DATEADD('month',-1,[End Date]):

      COUNTD([Customer ID])}


      This one does not, It gives me a larger number that seems to be the distinct values from multiple months and not just one.


      {FIXED [Zip Code], [Order Date]>=DATEADD('month',-2,[Start Date]),[Order Date]<=DATEADD('month',-2,[End Date]):

      COUNTD([Customer ID])}



      To note, count works fine and gives result but countd seems to give the distinct values over a larger time period than the month I am attempting.


      If this is too difficult to understand without a sample workbook I will try and create a sample workbook for help.