2 Replies Latest reply on Jul 20, 2016 1:47 AM by Ashish Chaudhari

    How to get this from and to filter

    Jessy Cool

      Hi Experts,

      I am using sample super store for mock up data.

      I am seeing sales of 2011 and 2012 and also seeing difference of both the years.


      Its working fine till this point.


      But what i need  adding to thhis is..

      a filter which is of date for 2011 and other filter for 2012


      Example : with this filters i can select say in 2011 feb to sep and in 2012 sep to december.


      and difference of sales will be shown for these months only .


      I have n idea how to get this done..please help me in writing logic fo this

        • 1. Re: How to get this from and to filter
          Łukasz Majewski

          It is imo rather peculiar way of analyzing measures by years. Anyway you could apply such a filter:

          1 of 1 people found this helpful
          • 2. Re: How to get this from and to filter
            Ashish Chaudhari

            Hi Jessy,


            Thanks for attaching workbook with inbuilt parameters. That has saved lot of time. Please find the attached workbook and screenshot and confirm the output.


            I have just made few changes to your calculated fields as below. Please update them. You will start getting output for the selected inputs.


            2011 sales

            if  YEAR([Order Date])=YEAR([From ( 2011) ])

            and MONTH([Order Date])>=MONTH([From ( 2011) ])

            and MONTH([Order Date])<=MONTH([To ( 2011 )])

            then ([Sales]) END

            2012 sales

            if  YEAR([Order Date])=YEAR([From (2012)])

            and MONTH([Order Date])>=MONTH([From (2012)])

            and MONTH([Order Date])<=MONTH([To (2012)])

            then ([Sales]) END

            Diff bet 2011 and 2012 (No changes made to this calculation)

            sum([2011 sales])-Sum([2012 sales ])


            (I think you should be doing Sum([2012 sales ])-sum([2011 sales]) but its all your call, since it is always Current - Previous. )


            Thanks and Regards,

            Ashish Chaudhari

            1 of 1 people found this helpful