2 Replies Latest reply: Dec 13, 2016 5:34 AM by Court van de Lisdonk RSS

    linear gauges in a straight table

    Court van de Lisdonk

      Hello,

       

      I have an expressions which gives me the last 12 months Sales in a straight table and in a LineChart. Dimension is  at the Moment YearMonth. The data I use, hast records with one amount with one date (dd-mm-yyyy)

       

      This expressions is

      = Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date#('$(sMonthYear)','MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

       

      So now in December2016 it shows the Sales from dec2015, jan2016......... untill nov2016

       

      I want to make three (mini) linear gauges in a straight table (with Dimension company) from this expressions

      so first gauge  for the months dec2015 - march2016, the second gauge  for the months april20165 - july2016 and the last for aug2016 -nov2016

       

      Can I use this Expression or should I build  a new expression with the new Dimension Company.

      And how should I do that.

       

      Thanks in Advance

        • Re: linear gauges in a straight table
          bruno bertels

          Hi may be this :

           

          assuming you want your YEARS divided in 3 sliding quadrimester , you can adapt your mesure like this :

           

          First gauge dec - march

          = Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-11),'MMM-YYYY')) <=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-8),'MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

           

          second gauge april - july

          = Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-7),'MMM-YYYY')) <=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-4),'MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

           

          third gauge august - nov

          = Sum({< YearMonth  = {">=$(=date(addmonths(date#('$(sMonthYear)','MMM-YYYY'),-3),'MMM-YYYY')) <=$(=date#('$(sMonthYear)','MMM-YYYY'))"}, Year=,Month=>} ActualAmount)

           

          hpe it helps