Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this
Load
[conA1 ] + [conB1 ] as TotalSum
From Table1;
My Expression Sum(TotalSum) thrown 5000
but I want to add an if sentence
Load
If([conA1 ] + [conB1 ] >0,'0', [conA1 ]+ [conB1 ]) | as TotalSum, |
From Table1;
My Expression Sum(TotalSum) thrown 4900
I need to appear 5000
How Could it be?
Thanks!
Hi Pablo,
I think I'm missing something in this question. You have an expression to calculate a field, called Consumo12a, which gives you the right result. This expression has no if. It simply makes the sum of two fields. Why do want to achieve, in the calculation of Consumo12, with that IF. Excluding the positive sums gave you the wrong results. Maybe you don't need that if and use the same expression as that of Consumo12a.
Please, tell me what I'm getting wrong from your question.
Eduardo
You probably inverted the then/else in the if
Try with:
if([conA1 ] + [conB1 ]>0,[conA1 ]+[conB1 ], 0) as TotalSum,
Eduardo
Hi Eduardo,
Still gives the same total 4900,
Thanks
Can vou share your qvw or at least part of it?
Eduardo
Eduardo,
The real result is -4714
The wrong result is 4874
Thanks!
When I tried to open the app, it asked for a userid and password. Please, disable Section Access.
Eduardo
Hi,
Can you verify if, in the property of expression in you have checked Expression Total or Sum of rows?
This selection would affect the result
regards,
I did not mention that this concerns "straight table". If you have a pivot table , no need to check.
Im Sorry,
Section Access was deleted,
Thanks!
Good morning , Pablo
Why do you use Consumo12 in one object and Consumo12a in the other. The object with Consumo12a is giving you the result you expected.
Please, send me more details, since I don't have the data sources.
Eduardo