Skip to main content

I am analyzing survey results and would like the table calculation to change to a "percentage of" the dimension when it is chosen from the parameter. For example, you can see below the number of survey respondents in the age of 18-24 is 62 respondents.

Tableu Calculation Percentage of Total within a DimensionFrom here, I've created a parameter that can change the dimension as it relates to survey questions. What I'd like to see is that 47 be a "Percentage Of" the total population of 18-24, or change to 76% (47/62). This would also change for all dimension segments.

imageThank you in advance for any insight you can provide.

 

Dave Wieser

9 answers
  1. Sep 28, 2022, 5:12 PM

    @Dave Wieser​ got it. The confusion was how to count the number of respondents.

    What I did is I created a LOD calculation which take into account Question Group (used as filter) and Age which in this case will be Chosen Dimension (selected from the Parameter).

    //# Respondents

    { FIXED [Question Grouping], [Chosen Dimension]:   COUNTD([Respondent ID])}

    After we get all numbers we can construct the %.

    //% respondents

    COUNT([Text Response])/SUM([# Respondents])

    Now you have the right result.

    @Dave Wieser​ got it. The confusion was how to count the number of respondents.Last one, you can add the % to the Label.

    imageDocument attached.

    Let me know if this is the result you're looking for.

    thanks,

    Adrian

0/9000