8 Replies Latest reply: May 31, 2018 12:33 PM by Thomas Williams RSS

    Syntax Error

    Thomas Williams

      Hi,


      I am having a problem with my syntax in the fact no data is being returned when it should be as I know the numbers are in the data. I mist be missing something within the syntax but not quite sure what, anyone have any ideas please?


      alt(sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

      Lookup={'1PD'}>}Val,0)

      /

      above(sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

      Lookup={'1PD'}>}Val,0)-1,0))

        • Re: Syntax Error
          Sunny Talwar

          May be this

           

          Alt(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

          Lookup={'1PD'}>}Val)/

          Above(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

          Lookup={'1PD'}>}Val)) -1, 0)

            • Re: Syntax Error
              Thomas Williams

              I have another syntax issue, do you mind if I put it on here or shall I start a new thread?

                • Re: Syntax Error
                  Sunny Talwar

                  If it is a similar kind of issue, you can... I guess use your best judgement

                    • Re: Syntax Error
                      Thomas Williams

                      Thank you.

                       

                      It's based on the syntax help earlier. This is supposed to be a cumulative growth and therefore I need the line chart to start at the month of Jan with a 0 value then show up to May.

                       

                      I have applied this kind of logic below elsewhere on my line charts by using a comma after the statement then repeating the same statement to stop the line showing post dated values. I am therefore trying to use it on this graph but the issues I have is that it shows Junes value and avoids Jans value of 0 which I think the Alt part of the function should work to show?

                       


                      if(Alt(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

                      Lookup={'1PD'}>}Val)

                      /

                      Above(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

                      Lookup={'1PD'}>}Val)) -1, 0)

                      ,

                      (Alt(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

                      Lookup={'1PD'}>}Val)

                      /

                      Above(Sum({<Period = {"$(='>=201801<=2018' & Num(Month(Today()), '00'))"}, [Country] = {'UK'},

                      Lookup={'1PD'}>}Val)) -1, 0)))