Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an expression which works fine in an app, however when I try to put this into a script, it doesn't work. The below is what I'm looking to achieve in the script;
sum(distinct{<[DG.class]={'1'}>}[DG.uomactqty])
Any ideas?
I think the issue isn't the use of distinct but rather that the chart function sum() and the script function sum() are not interchangeable, particularly where set analysis is concerned.
You can probably accomplish your goal with something like:
Table:
Load sum(distinct [DG.uomactqty]) as total resident DG group by <DG.something> where DG.class='1';
Then you can assign the total to a variable using the peek function.
SUM syntaxes:
The SetExpression does not works in sum script function like works in sum chart function