10 Replies Latest reply on Jul 7, 2011 4:55 PM by Joe Mako

    create a ratio by dividing the percentage represented by two specific members of a dimension

    Tim Harris

      I am trying to create a ratio by dividing the percentage represented by two specific members of a dimension – but not making much progress with the functions I am using.  Any guidance appreciated.

       

      Group Dimension1    Level Dimension2    Ratio

                Level 1          Level 2   

      Group1    9%            18%                          0.5

      Group2    91%            82%                          1.02

      Percent of the column total (the total going down the column)

      Ratio = level1 percent / level 2 percent

      The percentages in the cells are generated by Tableau easy enough.  I just cross the two dimensions.  I then hide Group2 because I am not interested in the result, but need it for the calculation (to generate the percentages).  What I want to do next is divide level1 percent / level 2 percent to generate the ratio.

       

       

      PS. I also used IF THEN statements to break each part of the calculation into separate steps.  Each one is valid on its own, but ultimately the query fails – too complex.