10 Replies Latest reply: Jan 15, 2018 9:59 AM by Jahanzeb Hashmi RSS

    Show Today's month Quantity  and Same Day Last Year's month Quantity

    K Kv

      Hello,

       

      Today is 15th January,2018. I want to show this month's data on the  bar chart until today  and also last year's data in this month(until 15th of January), I should show the quantity of these data,



       

      To show the data that was on the 15th of January in 2017, I use this formula for the dimension =AddYears(Date(Today()),-1) 


      To show the quantity that was in January until today(2018) I use this formula for the measure, that works quite well

      =Sum({$<Year={2018}>}Quantity)


      But I also want to make the same thing for the last year's data. I wrote this but this doesn't work

      Sum({$<Year={{(AddYears(Date(Today()),-1)}}>}Quantity)


      Capture.PNG


      How can I make it ?