1 Reply Latest reply on Jul 2, 2016 4:20 AM by Yuriy Fal

    Returning A Value of Zero instead of Blank Then Using that Zero Value in the Calculation

    Brad Gaston

      I am working with a data set that has ratings and corresponding locations and ratings totals.  Not all locations have ratings.  However, instead of returning with a value of zero the rating does not return at all. As an example one of the locations only has four ratings instead of all nine.  Therefore:

       

      Currently returns:

      A - 7

      B - 2

      C - 23

      D - 1

       

      Instead of

       

      A - 7

      B - 2

      C - 23

      D - 1

      E - 0

      F - 0

      G - 0

      H - 0

      I  - 0

       

      Additionally,  I use a calculation that determines the percentage of upper tier ratings (A, B, C) for a particular location.  If one of those values does not exist the calc does not work.  Ideally, a value of zero would be returned for the non occurring rating and the percentage would still work.  I have attach a  Tableau twbx file with captions to hopefully illustrate the issue. 

       

      I have gone through a couple of different iterations of ZN functions and IFNULL or ISNULL functions to no avail.  I appreciate any assistance the community can provide.

       

      Thanks!

       

      Brad