3 Replies Latest reply on Nov 26, 2018 5:15 AM by Jim Dehner

    Next n days sale

    priyanka Dachawar

      Hii, i am creating a dashboard for 'Next N Days Sale' . I wrote calculated field  as follow ,

       

      IF [Period]='Next' AND [Period1]='Day'

      THEN

      STR([Order Date] >= DATEADD('day', [No],TODAY()))

      END

      If in' No parameter' i insert 2 and today's date 23-11-18 then i am getting only one bar 25-11-18 but my requirement is to get 24 and 25 .

      I am not able to find out what's the problem with this calculated field.

        • 1. Re: Next n days sale
          Jim Dehner

          Good morning

          you are adding 2 to the sate and the inequality is >+   so the expression will return every thing greater or = to 25 chang eth No parameter to 1 to get all 24, 25 and all values greater than 24 -

          if you only want 24 and 25 you can add a second condition to create a range

           

          STR([Order Date] >= DATEADD('day', 1,TODAY()))

          and

          STR([Order Date] <= DATEADD('day', [No],TODAY()))

           

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: Next n days sale
            priyanka Dachawar

            Getting error can't logically 'and' string and string

            • 3. Re: Next n days sale
              Jim Dehner

              sorry-

               

              ([Order Date] >= DATEADD('day', 1,TODAY()))

              and

              ([Order Date] <= DATEADD('day', [No],TODAY()))

              Jim'

               

               

              If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.