3 Replies Latest reply on Sep 16, 2018 9:35 AM by Anthony Sardain

    Table calculation returning NULL value

    Anthony Sardain

      Hey all,


      I'm just starting with Tableau so forgive the entry level question.


      I'm trying to visualize the change in the number of fatalities in Afghanistan, by region – comparing this week with last week. The data is set up such that each armed conflict event is listed as a separate row in my data, and each has an associated number of fatalities. I began by calculating a regional sum of fatalities for the dates of interest "RegionSum". As you can see in the first sheet, this seems to work. I would now like to calculate the difference between the two weeks – i.e. looking at sheet 1, I'd like Map2-Map1. I tried doing this by adding a table calculation (difference based on Week of Event Date), and while this appears to work for some regions (see second map on sheet 2), it doesn't for some regions, instead seemingly returning a NULL value.


      How do I resolve this? For the purposes of my analysis, we can assume that if no fatalities are reported (i.e. no conflict event rows for a given region/area and given week) then the number of fatalities was 0.