Forum Discussion

leudyston's avatar
leudyston
Helper I
8 years ago
Solved

Remove Negative Values ​​with Calculate

Hello friends, I need to create a measure that can only bring the positive values ​​of an expression and that the total of this measure is also calculated only by adding the positive values, I have t...
  • Ashish_Mathur's avatar
    Ashish_Mathur
    8 years ago

    Hi,

     

    Try this revised measure

     

    =if(HASONEVALUE(ditens[Tamanho]),IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0),SUMX(SUMMARIZE(VALUES(ditens[Tamanho]),[Tamanho],"ABCD",IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0)),[ABCD]))

     

    Hope this helps.