Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Split an IF

hello I have the following code dax that returns me a number of those that are blank
Orders that did not enter = if(Difference[Orders Exist in Orcon] = BLANK(),
1,
0)
this when counting it gives me 45
in the other column I perform a search for one column with another and it returns a number 224
LOOKUPVALUE(INF01_Ordenes_v2_2[North],INF01_Ordenes_v2_2[North],Difference[Nro_de_Negocio])
now I want to make a rate of how much percentage affects from 45 to 224 but I make a division of the 2 columns and does not allow me, how could I do this ?
upshot:
Total | No income| Impact rate %
224 | 45 | 20,08%
Thank you
  • v-angzheng-msft's avatar
    v-angzheng-msft
    4 years ago

    Hi, Syndicate_Admin 

     

    Try this:

    % =
    DIVIDE (
        SUM ( Difference[Orders that did not enter] ),
        COUNT ( 'Difference'[Nro_de_Negocio] )
    )
    

    Because your [Nro_de_Negocio] column is a numeric type instead of a text type, when you sum the column, the result is much greater than 225, so you get a result close to 0.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • use this formula

    % =
    DIVIDE(
    SUM(Difference[Orders that did not enter]),
    SUM('Difference'[Nro_de_Negocio])
    )
    BEAT_CRETAMAL_0-1638137993943.png

    me da 0

    BEAT_CRETAMAL_1-1638138105375.png

    • v-angzheng-msft's avatar
      v-angzheng-msft
      Community Support

      Hi, Syndicate_Admin 

       

      Try this:

      % =
      DIVIDE (
          SUM ( Difference[Orders that did not enter] ),
          COUNT ( 'Difference'[Nro_de_Negocio] )
      )
      

      Because your [Nro_de_Negocio] column is a numeric type instead of a text type, when you sum the column, the result is much greater than 225, so you get a result close to 0.

       

       

      Best Regards,
      Community Support Team _ Zeon Zheng


      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.