7 Replies Latest reply: Mar 15, 2017 4:19 AM by Sunny Talwar RSS

    Reemplazar Nulos en una Expresión

    Daniel Martinez Perez

      Hola,

       

      Tengo la siguiente expresión:

       

      NUM (SUM({<[COUNTRY DQ] = {'ESPAÑA'}, [BUSINESS DB DQ]= {'CREDIT'}>}[INDEX DATA Q]),'#,%')


      Y quiero que cuando sea 0, me ponga N/A.


      He intentando lo siguiente pero no funciona:

       

      =if(IsNull(NUM (SUM({<[COUNTRY DQ] = {'ESPAÑA'}, [BUSINESS DB DQ]= {'CREDIT'}>}[INDEX DATA Q]),'#,%')), 'N/A', NUM (SUM({<[COUNTRY DQ] = {'ESPAÑA'}, [BUSINESS DB DQ]= {'CREDIT'}>}[INDEX DATA Q]),'#,%'))

       

      Tb he intentado formular en el script que para todos los valores que haya nulos me ponga N/A:

       

      NullAsValue *;

      SET NullValue='N/A';

       

      Como debería hacerlo?? Lo más correcto me parece modificar en el script para que me sirva para todas mis expresiones.

       

      Gracias,

       

      ----------------------------------------------------ENGLISH-------------------------------------------------------------------------------------------

      I have the following expression:

      NUM (SUM ({<[COUNTRY DQ] = {'SPAIN'}, [BUSINESS DB DQ] = {'CREDIT'}}} [INDEX DATA Q], '#,%')

      And I want it to be 0 when I get N / A.

      I'm trying the following but it does not work:

      =if(IsNull(NUM (SUM({<[COUNTRY DQ] = {'ESPAÑA'}, [BUSINESS DB DQ]= {'CREDIT'}>}[INDEX DATA Q]),'#,%')), 'N/A', NUM (SUM({<[COUNTRY DQ] = {'ESPAÑA'}, [BUSINESS DB DQ]= {'CREDIT'}>}[INDEX DATA Q]),'#,%'))

      I tried to formulate in the script that for all values that have been null and I put N / A:

      NullAsValue *;
      SET NullValue = 'N / A';

      What can I do? The most correct thing seems to me to modify in the script so that it serves me for all the expressions.


      Thanks