1 Reply Latest reply on Apr 5, 2016 11:04 AM by Patrick A Van Der Hyde

    Table Calculation Quick Filter

    Harnish Patel

      Hi all,

       

      I am trying to set up a table calculation of a set. What i want to do is calculate % of hours based on the selection filter. For example, I would want to see Regular Hours / the sum of those in the filter. Right now I have it diced out by facility, but i plan on introducing zones and cost centers to this using parameters.

       

      I've attached a sample workbook to illustrate my issue.

       

      Thank you!

       

      -Harnish

        • 1. Re: Table Calculation Quick Filter
          Patrick A Van Der Hyde

          Harnish,

           

          Thank you for providing the workbook.  I am not sure what is being attempted here though.  We have three measures created from the Dimension Year being equal to a value for that year..  How do the values in these measures relate to "Regular Hours"?

           

          Let's take one example - are you looking to find the percent of ABC hours that are the total hours for a month/year?  The view compares years currently and is not setup as Date type fields which would help with month over month or year over year comparison that Tableau can do easily.  Let me share how to get the date field setup.

           

          First - create a Month field as a numeric:

           

          I called this [Month as Num]

           

          Case [Month]

          when "Jan" then 1

          When "Feb" then 2

          When "Mar" then 3

          When "Apr" then 4

          When "May" then 5

          When "Jun" then 6

          When "Jul" then 7

          When "Aug" then 8

          When "Sep" then 9

          When "Oct" then 10

          When "Nov" then 11

          When "Dec" then 12

          END

           

           

          And then create a Date() conversion of Month/Date/Year as -

          date(str([Month as Num])+"/1/"+[Year])

           

          Anyway - see if that starts you down a path for easier comparisons and if not, please share more details about a specific example and known outcome that you are having issues trying to represent.

           

          saved .twbx attached is in v9.3

           

          Patrick