9 Replies Latest reply on Apr 16, 2019 7:12 AM by Vesko Filipov

    Some help with one visual

    Vesko Filipov

      Hello everyone,

       

      I'm working on tableau almost an year and this is my first discussion here. For now i managed to made my tasks with lot of reading and testing but this time i need from some advises.

      The idea of what i want sounds very easy The example workbook( version 2018.3.0) is also attached. In summary we have :

      - brands ( column "brand")

      - sub brands ( column "productName")

      - rating ( column "Combined Rating")

       

      I need to create a bar chart visual based on brands with Table calculation Percent of total and compute using Rating ranges( this is a pill on color marks). Rating ranges is an average( rating) for every sub brands.

      Picture example :

      PicExample.png

      The problem is the data source structure because every raw is multiplied based on comments :

      - respondent ID ( column "TextID")

      - comment ( column "Text")

      - part of the comment ( column "Text Part")

       

      I realized that its not possible just to use AVG([Combined Rating]) because i need the avg rating per unique TextID and also productName ...

      Picture example data source:

      Pic2Example.jpg

       

      If i use this calculation the percent of total is 170%

      "IF {fixed [TextID],[productName]: AVG([Combined Rating])}>=4.4 THEN "% Over 4.4"

      elseif {fixed [TextID],[productName]: AVG([Combined Rating])}<4.4 and {fixed [TextID],[productName]: AVG([Combined Rating])}>=3.4 THEN "% 3.4 - 4.4"

      else "% under 3.3"

      END"

       

      And if its only on product level the percent of total is ok 100% but this is not the correct values

      IF {fixed [productName]: AVG([Combined Rating])}>=4.4 THEN "% Over 4.4"

      elseif {fixed [productName]: AVG([Combined Rating])}<4.4 and {fixed [productName]: AVG([Combined Rating])}>=3.4 THEN "% 3.4 - 4.4"

      else "% under 3.3"

      END

       

       

      This is my 3rd day with this problem and I will be happy for any suggestions and ideas.

       

      Best Regards,

      Vesko