2 Replies Latest reply on Feb 15, 2016 4:00 AM by Tableau kumar

    Hiding values from time n-1

    Ziv Gostinski

      Hi,

       

      I'm creating a dashboard that presents only 2 things:

      1. a raw number for the current week, and

      2. a table calculation showing the % difference from the raw value of the previous week.

       

      To accomplish this I filter only the last two weeks, and hide the previous week.

       

      The problem is that a week later this isn't working because there is a new previous week, which is not hidden.

      I can't filter out the previous week because it will not be available for the % change table calculation.

       

      How can I have only the two figures I want?

      Can I dynamically hide a value?

       

      Thanks!

        • 1. Re: Hiding values from time n-1
          nicolas.allerhand.0

          Hello, you can use index() function in a calculated field, then put it in filters block and hide the first value if you are using table.

          1 of 1 people found this helpful
          • 2. Re: Hiding values from time n-1
            Tableau kumar

            1) Create calculation as below to get the Last week Sales Volume.

            Name Last Week Sales

            Syntax: if datediff('week', [Order date ], today()) = -1 then [Sales] end

            2) Create another calculation as below to get the current week Sales Volume.

            Name: Current Week Sales

            Syntax: if datediff('week', [Order date ], today()) =0  then [Sales] end

            3) Create another calculation as below to get the Difference between current week Sales &  Last Week Sales.

            sum(Current Week Sales) - sum(Last Week Sales)

            4) Now you can place the above all 3 calculated fields on the view.

             

            Best Regards

            Kumar

            1 of 1 people found this helpful