1 Reply Latest reply on Jul 24, 2015 8:12 AM by Manny Navarro

    Exclude Current Month or Current Week

    Shantanu Mendhekar

      Hello all,

      I have a Tableau Dashboard in which I am using a parameter named 'Date Period' which has two options to select - 'Year-Month' and 'Year-Week'. I want to have an option of excluding the current month when I select the parameter as 'Year-Month' and exclude the current week when I select the other option of 'Year-Week'.

      To better understand the functionality, I am attaching a sample Dashboard. Right now, it has the option to exclude the current month or current week as a Quick Filter. But, you have to painfully select True or False on each logical filter respectively when you switch the options in the 'Date Period' parameter.


        • 1. Re: Exclude Current Month or Current Week
          Manny Navarro

          Hi Shantanu!


          Attached is an update to the workbook you provided above, which includes Sheet 2 and a calculated field named [Inventory Qty.Revised].


          This field has a CASE statement which, upon your Date Period parameter selection, executes 1 of 2 IF statements which now include your date filters:

          Case [Date Period]

              WHEN "Year-Week" THEN

                  IF [Date] < DATETRUNC('week',TODAY()) THEN

                      [Inventory Qty] END

              WHEN "Year-Month" THEN

                  IF [Date] < DATETRUNC('month',TODAY()) THEN

                      [Inventory Qty] END



          Please let me know if this solution meets your needs.


          Kind Regards,