1 Reply Latest reply on Apr 15, 2016 1:09 AM by Sankarmagesh Rajan

    How to get from and to filters seperately

    Jessy Cool

      Hi ,

      I am looking for 2 filters which says from and to month,quarter, week.

       

      From month to Month

      From quarter to quarter

      from week to week

       

      based on from and to selection of filters my viz wil display data..

        • 1. Re: How to get from and to filters seperately
          Sankarmagesh Rajan

          Hi Jessy,

           

          Create 3  parameters.

          Start From.

          End and Select View.

          Select View

          Create calc as [Select View]

           

          if [Select View]="Month" and month([Order Date])<=[End ] AND month([Order Date])>=[Start from] THEN "True"

          elseif [Select View]="Quarter" and datepart('quarter',[Order Date])<=[End ] AND datepart('quarter',[Order Date])>=[Start from] THEN "True"

          elseif [Select View]="Week" and datepart('week',[Order Date])<=[End ] AND datepart('week',[Order Date])>=[Start from] THEN "True"

          else "False"

          END

           

           

          Create 2nd calc as [view calc]

          if [Select View]="Month" then month([Order Date])

          elseif [Select View]="Quarter" then datepart('quarter',[Order Date])

          elseif [Select View]="Week" then datepart('week',[Order Date])

          END

           

          show parameter and type the values from and to and select view type.

           

          Drag view calc into row and sales into text.

          Drag  [Select View] into filter and select true.

           

          Thanks

          sankar