Tableau Tip: Filtering two fields by the same value

Makeover Monday Week 34 was based on ACLED conflict data. The dataset was very broad, covering a geographical area from Africa, across the Middle East and into South East Asia. I decided to look at instances in the database involving the militant group Islamic State.

I hit an initial issue. The actors in each event were split into two fields, ‘Actor1’ and ‘Actor2’, with no rhyme or reason as to which field any given group would be placed into. This meant I couldn’t simply filter the data by one field or the other if I wanted to get the whole picture. I also couldn’t just add the same filter for both fields, as that would only return instances involving Islamic State as both Actor1 and Actor2.

Screenshot of ACLED database. Actor1 and Actor2 contain either participant.

My solution to this was a nice simple calculated field. By writing an IF statement, I specified that if the Actor1 OR Actor2 fields contain Islamic State, then return true, otherwise return false.

A true or false calculation to filter for any event involving Islamic State

Then by simply filtering out the false values, I could evaluate the breakdown in event type across the years, as you can see in my viz below.

Makeover Monday Week 34 Dashboard

Author:
Nick Jastrzebski
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab