1 Reply Latest reply on Feb 16, 2016 1:19 AM by Tableau kumar

    Change date level with parameter

    Bhuvana Balaguru

      How can I create a formula that will show me 2 years,1year,Since Jan, Last 30 days as a filter or parameter that will be applied to values/measures in a worksheet

        • 1. Re: Change date level with parameter
          Tableau kumar

          The following link reveals about how to see last N Days data on the view,

          Tableau BI: How can we show Last N Days of Data in Report

           

          1) If you want to control trhe data with diffrent Date Levels,  Have to create 2 Parameters 1 is for Date Lavel,2nd is for integers.

          Parameter Name : Date Level

          Data type: string   and values are as below

          month

          day

          year

          quarter

           

          no. of specific level difference

          Parameter Name : [No of steps]

          Data type: integer

          range, define the min, max, stp values

           

          2) Create a calculated field as below,

          if datediff([ Date Level], [Order Date], Today() ) = [No of steps] then [Sales] end

          3) Now the above calculated field yields the your desired out put.

           

          Best Regards

          Kumar