4 Replies Latest reply on Nov 11, 2016 10:33 AM by Sherzodbek Ibragimov

    Mix aggregation error on measures

    Cedric Wood

      I could use a little assistance…..

       

      I’m trying to calculate the days between dates excluding weekends.  I’ve figured out the formula but noticed that it included holidays.  We have a file in our database that flags holidays so I created a calculated field that counts the number of holidays in the data range. In trying to subtract the number of holidays from the number of days between dates, I’m getting the aggregation error. 

       

      Calculated field = Plan Days:

       

      DATEDIFF("weekday",[Sess Add Date],[Certify Date])-2*(DATEPART('week', [Certify Date]) -DATEPART('week', [Sess Add Date]))

       

      Holiday Count

       

      COUNT([Wdexcp])

       

       

      When I try to evaluate these two calculated fields, I get the aggregation error…

       

      DATEDIFF("weekday",[Sess Add Date],[Certify Date])-2*(DATEPART('week', [Certify Date]) -DATEPART('week', [Sess Add Date]))-[Holiday Count]

       

       

      Any assistance is appreciated…