10 Replies Latest reply: Jan 4, 2016 11:05 AM by Moreira Carlos RSS

    Convert Null Values into String or Int


      I'm new to QlikView and this is a problem that might be easy for most of you but I've spent 5 hours trying to solve this.

      I've searched for this but can't find a solution for my case.


      Basically I need to Suppress All rows that have values. In other words, I just want the Null's of that Column.


      My solution for this problem was to create a calculated dimension that changes the values (transforms what is Null into a string for example and the non-Nulls into nulls) and then click Suppress When Value is Null.


      For that I've used this expression:


      if( IsNull(Invoice.InternalDoc), 'NA', null() )


      But the result is not what I expected.


      Here's a what I got and what was I expecting:


      ID          DIM               Expected Result          Actual Result

                                           CreatedDIM               CreatedDIM

      -----       -----------               ------------------              ------------------

      1          NULL                      NA                         NULL

      2          NULL                      NA                         NULL

      3          123                         NULL                     NULL

      4          321                         NULL                     NULL  


      Where DIM is the Dimension that exists now, and CreatedDIM the one I created now to invert Values.

      Once I want for the Straight Table to only show ID 1 and 2.


      P.S. I can't make any changes to the data model, so I need to solve this directly in this report.


      If anyone has an answer to this I would appreciate very much


      Mensagem editada por: Moreira Carlos Attached sample