Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following expression
(sum(alt(AMOUNT_DUE_REMAINING,0))-Sum(Alt(AMOUNT_APPLIED,0)))/1000
33 |
0 |
60 |
10,571 |
23 |
86 |
512 |
2,827 |
1,339 |
but if I change it to
sum(alt(AMOUNT_DUE_REMAINING,0))-Sum(Alt(AMOUNT_APPLIED,0))/1000
I get these figures which are great because the zero figure on the second row is correct, although the rounding is missing on all figures. I have tried the round function but still the same values.
32,526 |
-117 |
59,925 |
10,571,403 |
22,975 |
85,759 |
512,471 |
2,827,071 |
1,338,635 |
Thanks much appreciated in advance.
Provide sample data to check..
Both of your expressions look same?
The brackets are in different places
(sum(alt(AMOUNT_DUE_REMAINING,0))-Sum(Alt(AMOUNT_APPLIED,0)))/1000
VS
sum(alt(AMOUNT_DUE_REMAINING,0))-Sum(Alt(AMOUNT_APPLIED,0))/1000
the data is part of a complex model and I cannot due to company policy also not too sure how to extract correctly for you to check.
What is the expected output? the second table?
I think in your first expression you are dividing the subtraction of two expression by a 1000
(Expression1 - Expression2)/1000
and in expression 2, you are dividing just the expression2 by 100
Expression - (Expression/1000)
Now, I am not sure what you are trying to do... do you mind explaining what the goal is?
the goal is to have the output like this
33 |
-117 |
60 |
10,571 |
23 |
86 |
512 |
2,827 |
1,339 |
LOL... without knowing your data, how we can give you same output..???
Try this may be
If(
(Sum(AMOUNT_DUE_REMAINING) - Sum(AMOUNT_APPLIED))/1000 = 0,
-Sum(AMOUNT_APPLIED)/1000,
(Sum(AMOUNT_DUE_REMAINING) - Sum(AMOUNT_APPLIED))/1000
)