Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

calculated field displaying as a negative number in the view

  • 1.  calculated field displaying as a negative number in the view

    Posted Jun 01, 2020 01:28 PM
    I have created a calculated field to measure the difference in days since an Opportunity has been modified, as follows:

    screen shotAnd it displays as a whole number (of days) on the Opportunity form.:
    screen shot 2

      However, when I add it to a view, it displays as a negative number as in the image below:
    screen shot 1
    The only filter criteria on this field is "modified on" is more than 30 days.

    Does anyone know why this is displaying as a negative number?  And more importantly, how to modify the system to display a positive number on both the form and the view?

    Thanks for your insight!


    ------------------------------
    Daryl Van Liew
    Account Executive
    Wagstaff Inc.
    Spokane WA
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: calculated field displaying as a negative number in the view

    TOP CONTRIBUTOR
    Posted Jun 02, 2020 08:40 AM
    Hi @Daryl Van Liew,

    One suggestion: Try reversing Modified On and Now in your calculation to: DiffinDays(Now(), Modified On) and see if that helps.



    ------------------------------
    Geoff Ables
    Managing Partner
    C5 Insight
    Charlotte NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: calculated field displaying as a negative number in the view

    Posted Jun 02, 2020 01:21 PM
    Hi Geoff,

    Thanks for your response, appreciate the quick reply.  When I switched the variables in the formula, the value on the form changed to a negative value but the view did not change, it also remained negative.  I've reviewed properties on the View to see if that's where the problem is but there is nothing to indicate the view is manipulating the value to change it to a negative number.  here's a screen shot of the field definition.  I just ticked the two "interactive search" boxes and it did not change anything in the view.
    screen shot 3
    Wondering if there's a way to tell the system to display the absolute value?  Maybe with a business rule?  Why would the value be different on the form vs. the view?  Doesn't make sense to me.

    ------------------------------
    Daryl Van Liew
    Account Executive
    Wagstaff Inc.
    Spokane WA
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: calculated field displaying as a negative number in the view

    TOP CONTRIBUTOR
    Posted Jun 02, 2020 01:25 PM
    Hi @Daryl Van Liew,

    Well, I was hoping for an easy solution.

    There is no Absolute Value function. But you could add some logic like "if value < 0, then value = value * -1​...not sure if that's possible, but I think it shoudl work.

    ------------------------------
    Geoff Ables
    Managing Partner
    C5 Insight
    Charlotte NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: calculated field displaying as a negative number in the view

    TOP CONTRIBUTOR
    Posted Jun 02, 2020 02:26 PM
    Hey @Daryl Van Liew,

    My last reply was a little hasty - keyed in between meetings. A couple of thoughts:

    • I've tested this in a sandbox and cannot repeat the same behavior.

    • I noticed the field in your view is titled ​"Days since modified" but the field in your calculated field appears to be "Time Since Modified". Is it possible that you're displaying a different field in your view than on your form?

    • If the field is the same and it is just displaying incorrectly, I don't think it is actually be storing a negative value. If that's the case, I'm not sure that there is a way to setup a calculated field to fix the problem. It may be a bug that needs to be reported to Microsoft.


    ------------------------------
    Geoff Ables
    Managing Partner
    C5 Insight
    Charlotte NC
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: calculated field displaying as a negative number in the view

    Posted Jun 02, 2020 03:05 PM
    Thanks, Geoff.  The "Days Since Modified" is just the label, it is referencing the correct field, see below:
    screen shot 4

    I think I'm going to "start over" and see if it happens again.  If it does, I'll submit a ticket Microsoft.  Thanks for your help!!

    ------------------------------
    Daryl Van Liew
    Account Executive
    Wagstaff Inc.
    Spokane WA
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role