cancel
Showing results for
Did you mean:
Creator

## how to make a sum

Hi,

I have a problem with counting totals in a new table. I don't know how to make the new table show the same total as the old table but the problem is that in the new table I have to group by calendar and in the old table I have to group by article

Old table:

Script:if((sum({<Merkmal={"23"}>}Auspr)>=8500 )/16000,'1',sum({<Merkmal={"23"}>}Auspr)/16000)

new table:

Script:sum({<Merkmal={"23"}>}Auspr)/16000

1 Solution

Accepted Solutions

Both expressions aren't identically and therefore it's rather unlikely that they would return the same results. Beside this the expression isn't a simple aggregation else it contains conditions which are related to the dimensionally context in which they are performed.

This means you need to unify both expressions in regard to the mentioned context. If we assume that your first expression/object is correct you need for the second object an expression like this one:

sum(aggr(Expression, Teile, KW))

- Marcus

8 Replies
MVP

Hi

May be, try like below

Sum({<Merkmal={"23"}>}Aggr(sum({<Merkmal={"23"}>}Auspr)/16000, Teile, KW))

Thanks & Regards, Mayil Vahanan R
Contributor III

It may be that there are some Null values in one of the fields of selection.

Creator
Author

hi Mayil

its not working 😞

MVP

Hi

can you share sample app??

Thanks & Regards, Mayil Vahanan R
Creator
Author

Unfortunately, that can be a problem

Creator
Author

Maybe the problem is with the 1 in this upper scrypice, notice that if it exceeds the given amount it has to write one

Both expressions aren't identically and therefore it's rather unlikely that they would return the same results. Beside this the expression isn't a simple aggregation else it contains conditions which are related to the dimensionally context in which they are performed.

This means you need to unify both expressions in regard to the mentioned context. If we assume that your first expression/object is correct you need for the second object an expression like this one:

sum(aggr(Expression, Teile, KW))

- Marcus

Creator
Author

Thank you

Community Browser