7 Replies Latest reply on Feb 29, 2016 10:04 PM by Yuri Fal

    Null values in Table Calculation


      Hi all,


      I'm having trouble getting Tableau to handle null values appropriately in a table calculation. I've created a Year over Year table calc that shows the difference in number of orders between two years based on region and product category (calculating difference from order date level of detail):

      For example, as indicated in the above table, my Office Supply orders in the Atlantic region increased by 3 between years 2011 and 2012. Similarly, my orders for technology products in Atlantic increased by 26. The problem is that this table calculation will not treat null values as 0, so if I had no orders in one year and 10 in the next, the table value will appear blank. An example of this is with Furniture products, which I only started selling in 2012. (see table below):

      I would expect my YoY order difference calculation to show that between years 2011 and 2012 I increased my furniture sales by 51 in Atlantic, 21 in Northwest, etc, but instead it just shows blank. I've tried using the ZN and IFNULL functions to no avail. Any help would be very appreciated!!