Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
hjmm
New Member

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.

2 ACCEPTED SOLUTIONS
jdbuchanan71
Super User
Super User

@hjmm 

Try these.

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

View solution in original post

SpartaBI
Community Champion
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

View solution in original post

4 REPLIES 4
SpartaBI
Community Champion
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

So simple. Thanks

 

jdbuchanan71
Super User
Super User

@hjmm 

Try these.

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

Thank you

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.