Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want do some statistical aggregations about the distribution from a certain datas over various time-periods. For this I use avg/median/fractile which are working fine. But now I need to sum/avg parts of this, for example the 80% which are between fractile(sum(value), 0.1) and fractile(sum(value), 0.9). Any ideas how this could be solved?
- Marcus
Not sure if understood right. Is it somehow close to this: Show Bottom 5 in Bar Chart?? ?
It goes in the right direction but don't worked for me. My case is a bit more complicated then I need to use aggr within the set analysis and it seems that comparing one aggr-result against another aggregation isn't possible:
avg({< F2 = {"=avg(aggr(sum(F1), F2))>fractile(sum(F1), 0.9)"}>} F1)
don't worked although both expression-parts are working alone and with comparing against a fixed value the expression worked:
avg({< F2 = {"=avg(aggr(sum(F1), F2))>1000"}>} F1)
- Marcus
Unfortunately it didn't worked.
is it possible to create the below Aggregation in Script
1) avg(aggr(sum(F1), F2))
2) fractile(sum(F1), 0.9)
Compare 1) & 2) in Script & create Flag then finally you can do avg({<Flag={1}>}F1)
Script pre-calculations aren't possible - it needs to be flexible to selections like periods, areas and categories and also the fractile-parts should be per variable eligible.
I would try with IF and aggr(), rather than Set Expression.
Many thanks for your help. The set analysis approach is the better one and in my expressions was only a TOTAL missing, so that this worked:
avg({< F2 = {"=avg(aggr(sum(F1), F2))>fractile(TOTAL sum(F1), 0.9)"}>} F1)
- Marcus