Forum Discussion

hjmm's avatar
hjmm
New Member
4 years ago
Solved

SUM specific values in Column

I have an important column with positive, zero and negative numbers. I need to SUM the negative and postive values separately. New to Powerbi hopefully simple solution.

  • hjmm 

    Try these.

    Positive = CALCULATE ( SUM ( 'Table'[Amount] ) , 'Table'[Amount] > 0 )
    Negative = CALCULATE ( SUM ( 'Table'[Amount] ) , 'Table'[Amount] < 0 )
  • hjmm 

    SUM_Positive = 

    CALCULATE(SUM('Table'[Column]), .Table'[Column] > 0)

     

    Same for negative, just replace > with <.

    Put your table and column names instead the generic names I used

4 Replies

  • hjmm 

    Try these.

    Positive = CALCULATE ( SUM ( 'Table'[Amount] ) , 'Table'[Amount] > 0 )
    Negative = CALCULATE ( SUM ( 'Table'[Amount] ) , 'Table'[Amount] < 0 )
  • SpartaBI's avatar
    SpartaBI
    Community Champion

    hjmm 

    SUM_Positive = 

    CALCULATE(SUM('Table'[Column]), .Table'[Column] > 0)

     

    Same for negative, just replace > with <.

    Put your table and column names instead the generic names I used