Using Tableau Sets Operator to discover PH election Insights

Wilson Chua
2 min readMay 24, 2022

--

Question: How many precincts gave BBM zero votes? How many for VPLeni? To quickly answer this, we use Tableau’s SET operator.

We first create a set of precincts where BBM got zero votes using Tableau. The data is based on Comelec Transparency server via Manila Bulletin. We filter the votes_amount to only those where BBM got zero votes (by setting max of vote_amount to 0) and the filter the Position field to “President”:

We then click on Marcos, BongBong (PFP) and create a set named : PrecinctsWhereMarcosGotZero

We repeat the process so we also are able to create a set named: PrecinctsWhereLeniGotZero by filtering the candidate name to “Robredo”. The next step is to combine the two sets to get precincts where BBM got Zero, but VP Leni did not.

Combined Set configuration screen:

In the above screen, we want to list all the precincts where BBM got zero votes, but remove those precincts where VP Leni ALSO got zero (maybe those are the precincts that were not open/had issues).

Now we create a new worksheet and use the combined set as a filter (in or out):

The Region is part of a geographic hierarchy. We can click on it to drill down to the Provincial, Municipal, Brgy and Precinct level.

For VP Leni, here is the counterpart information.

Many thanks to SQLBelle for her youtube video on Sets and Set Actions
https://www.youtube.com/watch?v=tGO1D18hKv4

--

--

Wilson Chua
Wilson Chua

Written by Wilson Chua

Data Analyst, Startup Founder, Tech Columnist

No responses yet