Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the following table
token, amount
A,10
A,10
B,20
C,30
and I would calculate total of distinct token, i.e. 10+20+30 = 60 instead of 70
How should I do it?
Thanks!
Try...
Sum(DISTINCT amount)
yes. Use the Distinct function in your expression.
=Sum(Distinct amount) and token as dimension
If you can load distinct values i suggest you to load the distinct values by using distinct keyword in the script. If you can't load distinct values you can use the expression like sum(Aggr(DISTINCT amount,token)) as there might me same amount mapped to different tokens which will give wrong result if you use sum(distinct amount).
find attachment.
hi
sum( DISTINCT amount)
Hi,
You can do it in expression by using Sum(DISTINCT amount) as expression.
Might be something like attached.
Hope this helps!