I’m working on a bit of a tricky one at the moment.
Working with some call centre satisfaction survey data and creating a chart that reports the % of respondents replying with each of the 3 possible responses to a question:
Choice A 50%
Choice B 25%
Choice C 25%
Simple enough so far. However, the survey has been asked across multiple call centres and there has been a request to weight these figures to reflect the volume of calls handled at each site.
I have calculated these weights and added them to my data so each record has the weight associated with its call centre field.
Call Centre Weight Survey Response
1 0.5 A
1 0.5 B
2 0.3 C
3 0.2 B
2 0.3 A
3 0.2 B
My question is how do I update my table calculation to produce the weighted scores?
SUM([Survey Response]) / TOTAL(COUNT([Survey Response]))
My first thought was to try:
((SUM([Survey Response]))*[Weight]) / TOTAL(COUNT([Survey Response]))
but Tableau gives an error because aggregate and non-aggregate values are mixed.
Anyone have any ideas of the top of their head?
I’ll try to construct an example with some sample data when I have a few minutes.
If Survey Response is text (A,B,C, etc.), then SUM([Survey Response]) doesn't make sense.
Generally, you can avoid "mixed aggregated and non-aggregated" errors by using MIN([Weight]) or similar, but providing a sample data would make it easier for others to figure out how to help you with this.