Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

calculated field is not performing calculation if 2 field contain value it dose not perform calculation only work when all field contain value

(0) ShareShare
ReportReport
Posted on by 365

In the Calculated field, this Calculation is not performing like I expected it's only calculated when all field contains a value and I want when 1 or more field contains value it shows its total value.   Could anyone can help me with this

pastedimage1618808953124v1.png

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,077 Super User 2024 Season 1 on at
    RE: calculated field is not performing calculation if 2 field contain value it dose not perform calculation only work when all field contain value

    Hii unbeatable,

    In this case, Do not you think you need to rewrite the logic of a calculated column similar to the below:

    1. If column 1 contains data and column 2 column contains data and column 3 contains data
      1. column 1 + column 2 + column 3
    2. Else if column 1 contains data and column 2 column contains data
      1. column 1 + column 2
    3. If column 1 contains data and column 3 contains data
      1. column 1 column 3
    4. If column 2 column contains data and column 3 contains data
      1. column 2 + column 3
    5. else
      1. 0
  • Suggested answer
    CRMJetty Profile Picture
    CRMJetty 3,508 on at
    RE: calculated field is not performing calculation if 2 field contain value it dose not perform calculation only work when all field contain value

    Hello,

    The users have three currency fields for recording expected revenue in three different areas.

    • Est. Revenue Furniture
    • Est. Revenue Copy/Print
    • Est. Revenue Supplies

    None of the fields are required.

    We need the calculated field called Total Est. Revenue, which is pretty easy to make. But if you add the three fields together, it will only show a result if all three fields have a value. If just one of them is blank, the result will appear empty

    Pls refer this detailed Blog to calculate field amount

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: calculated field is not performing calculation if 2 field contain value it dose not perform calculation only work when all field contain value

    Hi partner,

    One option is to populate these fields to 0 using Business Rules.

    http://www.marksgroup.net/blog/dynamics-365-using-business-rules-set-default-values/

    Go Setting > Customizations > Customize the system > Entities to select one entity you need, then create one business rule.

    pastedimage1618885898759v1.png

    Then use ‘Set default value’ action to set all fields you need value to 0, which will make number field is 0 for new records.

    pastedimage1618886063646v2.png

    Active the business rule and publish, then test it.

    When creating a new record, the number1 field is null if condition are not met, the number1 field is 0 if condition are met.

    pastedimage1618886743224v3.png pastedimage1618886848555v4.png

    Note: For existing records, the number field can't be changed.

    pastedimage1618886907323v5.png

    So you can run a background workflow to set existing null values to 0 or export all records and re import after setting it to 0 in excel or excel online.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,820 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,514 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans