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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hemanth52130
Employee
Employee

Sum positive and negative numbers of a column in power BI desktop

Hi All,

I have a column named IAA (datatype: decimal number) in the below table which have positive and negative values in it. I want to show the sum of all these values in the total (irrespective of positive or negative). The total of the IAA needs to be 7028277.40 

 

 

hemanth52130_0-1606214641602.png

 

If i take sum instead of don't summarize it's giving some garbage values.

 

hemanth52130_1-1606214993315.png

 

 

Please help with the solution

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @hemanth52130 

Try measure  as below to change total value:

 

measure=If(HASONEVALUE(Table(Account)),sumx(Table, Table[iAA]), sumx(Table, abs(table[iAA])))

 

 Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @hemanth52130 

Try measure  as below to change total value:

 

measure=If(HASONEVALUE(Table(Account)),sumx(Table, Table[iAA]), sumx(Table, abs(table[iAA])))

 

 Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hemanth52130
Employee
Employee

Hi Amit,

 

Thanks for the quick response. When we use ABS the values in the table are getting changes. All negative values to positive. Here my requirement is the values in the table should not change only the total needs to be sum of all the IAA column values.

amitchandak
Super User
Super User

@hemanth52130 , Try like

sumx(Table, abs(table[iAA]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.