3 Replies Latest reply on Mar 26, 2018 10:40 AM by Jeffrey Kritzman

    90Days Calculation

    matt hins

      Hi, I'm trying to create a calculated field with parameter that will allow users to select historical view from TODAY back 30days, 60days, and 90days but I'm having trouble getting the calculation to work without errors. So far, I've created a "Date Range Calc" as a measure using the following calculation:


      //Date Range Calc calls back to Date Range Parameter to restrict display data to time range selected from options: 30Days, 60Days, 90Days

      IF ([Date Range Parameter]="30 DAYS"

          AND DATEDIFF('day',[Created Date],TODAY())<=30) THEN 1


      ELSEIF ([Date Range Parameter]="60 DAYS"

          AND DATEDIFF('day',[Created Date],TODAY())<=60) THEN 1


      ELSEIF ([Date Range Parameter]="90 DAYS"

          AND DATEDIFF('day',[Created Date], TODAY())<=90) THEN 1




      What have done wrong here? Could you tell me how to go about setting up the parameter and calculated field to work properly?