Math Problem
Math Problem
I need to create an expression that will do a couple things.
I need to take the total number of units, divide by 1000, and then multiply the result by .25.
For example, I have 10,000 units. I need something like {Parcel.[Number Of Units] / 1000 (*.25)} . I'd "like" the .25 to be a variable since I'll use it in several places if that's possible. If not a nested formula would work.
I've been trying everything I can think of and get nothing but errors....
Thanks.
I need to take the total number of units, divide by 1000, and then multiply the result by .25.
For example, I have 10,000 units. I need something like {Parcel.[Number Of Units] / 1000 (*.25)} . I'd "like" the .25 to be a variable since I'll use it in several places if that's possible. If not a nested formula would work.
I've been trying everything I can think of and get nothing but errors....
Thanks.
Math Problem
Hello,
Please try following expression:
Please provide error message if it not work.
Thank you.
Please try following expression:
Code: Select all
{Parcel.[Number Of Units] / 1000 *0.25}
Thank you.
Math Problem
The error that I'm getting when I try that is:
"error CS0019: Operator '*' cannot be applied to operands of type 'decimal' and 'double'.
"error CS0019: Operator '*' cannot be applied to operands of type 'decimal' and 'double'.
Math Problem
Hello,
Please try following expression:
Thank you.
Please try following expression:
Code: Select all
{Parcel.[Number Of Units] / 1000M * 0.25M}
Math Problem
Thanks-that appears to work.Ivan wrote:Hello,
Please try following expression:
Thank you.Code: Select all
{Parcel.[Number Of Units] / 1000M * 0.25M}
For my future reference, can you tell me what adding the M behind the 1000 and .25 does?
Math Problem
Hello,
Quote:
Please check the following link: http://msdn.microsoft.com/en-us/library ... 80%29.aspxMikeC wrote:For my future reference, can you tell me what adding the M behind the 1000 and .25 does?
Quote:
Thank you.If you want a numeric real literal to be treated as decimal, use the suffix m or M, for example:
decimal myMoney = 300.5m;
Without the suffix m, the number is treated as a double, thus generating a compiler error.
You can also mix decimal and numeric integral types in the same expression. However, mixing decimal and floating-point types without a cast results in a compilation error.