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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

Change negative result to 0

Hi good day, 

Can anyone help me on my calculated column, if the result is negative change to 0.

 

Daily Earned =
CALCULATE (
    SUM ( 'JC Daily Progress'[Daily Earned] ),
    FILTER (
        ALL ( 'JC Daily Progress' ),
        'JC Daily Progress'[Progress Date] = EARLIER ( 'S-CURVE_OVERALL'[Plan Date] )
            && 'JC Daily Progress'[Projectname] = EARLIER ( 'S-CURVE_OVERALL'[ProjectName] )
    )
)
 
AllanBerces_0-1721038136785.png

Thank you

1 ACCEPTED SOLUTION

Hi @AllanBerces ,

 

Apologies for the typo.  What about like below?

Daily Earned =
VAR Result =
    CALCULATE (
        SUM ( 'JC Daily Progress'[Daily Earned] ),
        FILTER (
            ALL ( 'JC Daily Progress' ),
            'JC Daily Progress'[Progress Date] = EARLIER ( 'S-CURVE_OVERALL'[Plan Date] )
                && 'JC Daily Progress'[Projectname] = EARLIER ( 'S-CURVE_OVERALL'[ProjectName] )
        )
    )
RETURN
    IF ( Result < 0, 0, Result )

 Best regards,

View solution in original post

4 REPLIES 4
DataNinja777
Super User
Super User

Hi @AllanBerces ,

What about modifying your calculated column dax like below:

 

 

Daily Earned =
VAR Result =
    CALCULATE (
        SUM ( 'JC Daily Progress'[Daily Earned] ),
        FILTER (
            ALL ( 'JC Daily Progress' ),
            'JC Daily Progress'[Progress Date] = EARLIER ( 'S-CURVE_OVERALL'[Plan Date] )
                && 'JC Daily Progress'[Projectname] = EARLIER ( 'S-CURVE_OVERALL'[ProjectName] )
        )
    )
RETURN
    IF ( Result < 0, 0, Result )

Best regards,

Hi @DataNinja777 thank you for the reply, but showing some error.

AllanBerces_0-1721038720256.png

Thank you

Hi @AllanBerces ,

 

Apologies for the typo.  What about like below?

Daily Earned =
VAR Result =
    CALCULATE (
        SUM ( 'JC Daily Progress'[Daily Earned] ),
        FILTER (
            ALL ( 'JC Daily Progress' ),
            'JC Daily Progress'[Progress Date] = EARLIER ( 'S-CURVE_OVERALL'[Plan Date] )
                && 'JC Daily Progress'[Projectname] = EARLIER ( 'S-CURVE_OVERALL'[ProjectName] )
        )
    )
RETURN
    IF ( Result < 0, 0, Result )

 Best regards,

@DataNinja777 thank you all good.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.