Reply
Sdhn420
Helper IV
Helper IV
Partially syndicated - Outbound

Total of positive and negatives

Hi,

 

How can I show total of all negative and positive values?

I have a measure [Loss_of_Margin]

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Syndicated - Outbound

@Sdhn420 , for that you need a group by context

example

 

+ive =

sumx(values(Table[ID]), if([Loss_of_Margin]>0,[Loss_of_Margin],blank()))

 

-ive

sumx(values(Table[ID]), if([Loss_of_Margin]<0,[Loss_of_Margin],blank()))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Syndicated - Outbound

Thank you so much!! This worked like a charm! 😄

View solution in original post

5 REPLIES 5
Thennarasu_R
Responsive Resident
Responsive Resident

Syndicated - Outbound

Measure +IVE=
                 IF([MEASURE]>0,[Loss_of_Margin],bLANK())

MEASURE_IVE= IF([MEASURE]<0,bLANK(),[Loss_of_Margin])

selimovd
Super User
Super User

Syndicated - Outbound

Hey @Sdhn420 ,

 

can you provide more information?

How does the measure look like? Values always need a context, positive/negative values by customer or by product or by day. In which context do you want to analyze?

 

Thank you and best regards
Denis
amitchandak
Super User
Super User

Syndicated - Outbound

@Sdhn420 , for that you need a group by context

example

 

+ive =

sumx(values(Table[ID]), if([Loss_of_Margin]>0,[Loss_of_Margin],blank()))

 

-ive

sumx(values(Table[ID]), if([Loss_of_Margin]<0,[Loss_of_Margin],blank()))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Syndicated - Outbound

Hello @amitchandak , 

I found your answer and it work for my case with 1 condition. However, when i add 1 more condition, sumx total turn out wrong

I have data with 2 measue [Fcst order gap] & [%FR]

betty_bui2602_0-1666755432858.png

Order > Fcst =  sumx(values('MTD Attainment'[Material]), if([Fcst order Gap] > 0,[Fcst order Gap],blank()))
Order > Fcst - FR MISS = sumx(values('MTD Attainment'[Material]), if([%FR] < 1 && [Fcst order Gap] > 0,[Fcst order Gap],blank()))
By line it looks ok, but total is not right. Can you please help?
TIA 

Syndicated - Outbound

Thank you so much!! This worked like a charm! 😄

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)