2 Replies Latest reply: Nov 9, 2015 7:35 AM by Joanna Seldon RSS

    Colour a null

    Joanna Seldon

      Hiya

       

       

       

      unfortunately I have departments that are Null.

       

      I need to fill in this as white, as a space to allocate

       

      I have this colour expression in Qlik Sense

       

      if(  Trainers =  '1' , Green() ,

      IF(ISNULL(Department),rgb(128,128,128)

      ))

       

      no joy

       

      I have tried to change it to

       

      If(Len(Trim(Department)) = 0 , rgb(128,128,128)

       

      no joy

       

      please help

        • Re: Colour a null
          Serhan Celebi

          Hello Joanna,

           

          Maybe you can try giving them a name at back end.

           

          Like;

           

          LOAD

          *,

          If(isnull(Department),'XX',Department as Department1,

          FROM DATASOURCE;

           

          If you want a more classy way to color departments, add a department color table to your model.

           

          Like;

           

          LOAD

          Department,

          Red_Dept,

          Green_Dept,

          Blue_Dept

          FROM DATASOURCE;

           

          Then on front end, you can colorcode them without using IF.

           

          Like;

           

          =RGB(Red_Dept,Green_Dept,Blue_Dept)

           

          Should be joy, joy, joy then

           

          BR

           

          Serhan