2 Replies Latest reply: Nov 6, 2017 1:43 PM by KharanSU RATH RSS

    Define the expression

    KharanSU RATH

      Hi,

      I was going through a dashboard where I found a slider object showing comparison value for previous year and current year but as an entrant I couldn't understand the set expression. Can anyone please define this

       

      =year(AddYears(maxOrderDate,-1)) & ' vs. ' & year(maxOrderDate)  & ' ' & Only({<No={59}>} [$(=vDataLanguage)]) & ' = ' & num(( sum( {<Year={$(=Max(Year))}>} SalesAmount) - sum({<Year={$(=Max(Year)-1)}>} SalesAmount))/sum( {<Year={$(=Max(Year)-1)}>} SalesAmount), '#.#%')

       

      Regards,

      KHARANSU

        • Re: Define the expression
          Massimo Grossi

          =

          year(AddYears(maxOrderDate,-1)) & ' vs. ' & year(maxOrderDate) 

               if maxOrderDate is 2017

               2016 vs 2017

           

           

          &

          ' ' & Only({<No={59}>} [$(=vDataLanguage)])

               don't know, it depends on field No and variable vDataLanguage

           

           

          &

          ' = ' & num(( sum( {<Year={$(=Max(Year))}>} SalesAmount) - sum({<Year={$(=Max(Year)-1)}>} SalesAmount))

          /

          sum( {<Year={$(=Max(Year)-1)}>} SalesAmount), '#.#%')

               if max year is 2017  (sales amount 2017 - sales amount 2016) / sales amount 2016

               % change in sales amount