6 Replies Latest reply on Feb 4, 2019 7:04 AM by Sudhir Rathod

    How to show blank in place of null in a complex IF Statement

    Sudhir Rathod

      Hi Everyone,

       

      I have a scenario where there are 4 different values to a question?  The business wants to summarize them on a scorecard as follows -

       

      Question - Customer expects business to not call them after 8 pm?

      Answers could be - Yes, No, n/a or null

       

      In case of yes and no, it's easy to calculate as follows -

       

      ZN(SUM(IF [Do not call] = 'Yes' then 1 else 0 end) /

      SUM(IF [Do not call] = 'Yes' then 1

      ELSEIF [Do not call] = 'No' then 1 else 0 END))

       

      After placing this measure, n/a can be taken care by simply changing the format to custom by putting this great formula that I found online.  It is #,##0.00%;-#,##0.00;n/a

       

      Up to here it's fine.  But if this question has only null in the answer, our business wants to show the measure as blank space.  I have tried a lot of research and I am sure it's doable as nothing is impossible with Tableau so I am throwing this question out to great Tableau minds to help me out.  Thank you in advance!