1 of 1 people found this helpful
I understood that you are struggling to communicate your problem. But no worries, we are here to help and your explanation makes the problem clear. Let me see whether I can help you.
When you want to create a calculation that filters only a specific value of a Dimension (Green is one value of the Party Name Dimension), you have to create a calculated field like this below. Here I am just checking whether the Party Name is "The Greens" and if yes, I am adding up the Ordinary Votes. Otherwise, this equation returns a NULL which gets ignored when the SUM aggregation is applied when you drag this field to the view.
Then I create another calculated field to create the ratio - here I am doing a SUM on the Numerator and on the Denominator as we want to sum up all the values for the Deno & Nume and then do the division.
Now you want to calculate this value by Polling Station. Looking at your data set, I do not see Polling Station. I guess you mean 'Polling Place'. Hence, I have created a simple report - would this help you to solve your problem?
Wow, thank you so much! That was exactly what I was after!
Just to clarify the terminology, in the example above "Polling Place" is called dimension and "The Greens" is one value of this dimension?
Hi Simon, Glad to know your problem is resolved.
Yes, the Polling Place is the Dimension and “The Greens” is one of the values of the Dimension. Tableau purists would like to call “The Green” a member of the Dimension. For me, both convey the meaning.
To make it easy for you to understand, if you have this data in Excel, you would call “Polling Place” the column name and “The Greens” the value of a column. Here, the equivalent of a column name (metadata) is Dimension Name (in short, Dimension) and the equivalent of the column value (actual data) is Dimension Member or Dimension Value (or simply, a value). I hope this clarifies.