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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
alamhaz
Helper I
Helper I

negative values is not adding up

Hi there 

I need solution for this , my senario is that i am using one if condition on one measure that is

( if measure <0, measure1 * measure 2, 0) but when i put in table its not adding up only giving me 0 , if instead of 0 i give 1 in sum its giving me instead of suming up negative values. check the attached screen shot. measure.JPGtabke.JPG

1 ACCEPTED SOLUTION
alamhaz
Helper I
Helper I

Thanks for reply i solved the issue just use value function as below 

Avg Sale lost (Sum) = SUMX(VALUES('Product Movement'[Date]), [Avg Sale Lost])

View solution in original post

6 REPLIES 6
alamhaz
Helper I
Helper I

Thanks for reply i solved the issue just use value function as below 

Avg Sale lost (Sum) = SUMX(VALUES('Product Movement'[Date]), [Avg Sale Lost])
v-yalanwu-msft
Community Support
Community Support

Hi, @alamhaz ;

You could create a measure as folllow:

Avg Sale Lost =
VAR _tab =SUMMARIZE ('Table',
        [Index],
        "1",IF ( [Total Qty Diff Avg] < 0, [Avg Selling Price] * [Total Qty Diff Avg], 0 ))
RETURN
    SUMX ( _tab, [1] )

 The final output is shown below:

vyalanwumsft_0-1628664395623.png

If it not right ,can you share me simple file without sensitive information?

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

Hi thanks for answer but its is suming up but not multiplying as desired see the screen shot its supposed to multily because total Qty diff is less then 0 but its not and when i put this meaure in card its showing 0 , not negtive or postive values Capture9.JPG

Hi, @alamhaz ;

If you can share simple files, it will be better to remove sensitive information.

PaulDBrown
Community Champion
Community Champion

Try:

Avg Sale lost (Sum) = SUMX(Table, [Avg Sale Lost])

Where " Table" refers to the table you are using for the row context in the visual





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






No i need in same column i tried your solution answer is wrong. 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.