Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table
TASKNUMBER | ACCESS | ACCESSKEY | MH |
A | |||
A | 824 | A-824 | 0.025 |
B | 824 | B-824 | 0.025 |
B | 195 | B-195 | 0.02 |
C | 195 | C-195 | 0.02 |
I want to sum the values of MH only once for the Distinct values of 'ACCESS'
This is what I have so far.
sum(Aggr(Count(distinct ACCESS),ACC_MH)),ACC_MH)
It driving me a bit crazy. The solution to this will come in very handy for my whole app.
I don't think I can avoid AGGR here, however, Performance is becoming a concern so a Set Analysis solution is preferred.
Set analysis won't work here... but you can try this
Sum(Aggr(Sum(MH), ACCESSKEY))
Alternatively, you can take ACCESS and MH from your table and add it to another table in the backend so that only the distinct combination of ACCESS and MH exists and will join to your main table on ACCESS... if you do that, you will be able to just do Sum(MH)....
My so very bad... I think I am ready for the weekend... try this
Sum(Aggr(Sum(DISTINCT MH), ACCESSKEY))