web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DV Calculated column a...
Power Apps
Answered

DV Calculated column and IF statement

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone.  I am new to Dataverse and I am using a calculated column to show the remaining value left on an item.  This is working correctly, and the code I am using is below:

 

cr3db_totalcost - (cr3db_monthlydepriciationamount * cr3db_monthsfromacquire)

 

The issue is the numbers will eventually go negative.  I need it to stop at 0.  I was trying to use an IF statement, but cannot figure out the correct syntax. 

Something like If(NBV column >0,cr3db_totalcost - (cr3db_monthlydepriciationamount * cr3db_monthsfromacquire),0)

But I am 100% positive I am not approaching it correctly.

 

Thank you for any help!

Chris 

I have the same question (0)
  • Verified answer
    João Santos Profile Picture
    323 on at

    Hi,

    I feel like this is possible, but you might need to do two calculated fields instead of one. Something like

    Calculated Field 1: Total Depreciation = cr3db_monthlydepriciationamount * cr3db_monthsfromacquire

    No condition for this one

    Then:

     

    Calculated Field 2: Current Value

    If (Total Amount < Total Depreciation)

    Current Value = 0

    Else

    Current Value = Total Amount - Total Depreciation

     

    Hope this helps

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @ckserra33 ,

     

    Note (IN PREVIEW) but Power Fx in Dataverse should be able to easily handle your situation here with the advanced formulas that can be used... Example article explaining the functionality:  https://powerapps.microsoft.com/en-us/blog/power-fx-formula-columns-in-dataverse/ 

     

    The logic you are looking to do here would be basic with Power Fx (in preview) in Dataverse... 

     

     

     

  • ckserra33 Profile Picture
    421 on at

    @joaodsantos Thank you very much.  I figured it was something like that, thanks again!

  • ckserra33 Profile Picture
    421 on at

    @pdp Thank you very much for the idea, I just felt more comfortable doing it with 2 columns at this point in my knowledge of DV.  Thank you very much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard