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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Radhakrushna
Regular Visitor

Change Values from Negative to Zero in Calculated column

Hello Team,

 

I need you help on priority.

Need to show the Negative values into Zero in calculated column while doing subtract values from one column to another column.

Please find the below screen shot for your reference . 

BBB = Budget - Actual   (in BBB column we can see on row values is in Negative and that should be Zero instead of Negaive value )

 

Radhakrushna_0-1642836506170.png

 

Is it possible...? If possible, please help me on this ASAP on priority.

Thanks for your reply in advance. 

 

Regards,

RK

1 ACCEPTED SOLUTION
bcdobbs
Community Champion
Community Champion

If it's a calculate column try:

 

BBB =
VAR Result = TableName[Budget] - TableName[Actual]

RETURN

IF ( Result < 0, 0, Result )



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

If this is a measure and you want the rows to add up to the total, you'll have to iterate over the account type.

 

For example,

SUMX ( VALUES ( Table1[Account Type] ), MAX ( 0, [Budget] - [Actual] ) )

assuming [Budget] and [Actual] are defined measures.

CNENFRNL
Community Champion
Community Champion

Enclose your original measure [BBB] with max(0, bla ... bla)


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

bcdobbs
Community Champion
Community Champion

If it's a calculate column try:

 

BBB =
VAR Result = TableName[Budget] - TableName[Actual]

RETURN

IF ( Result < 0, 0, Result )



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors