Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have created a table containing a limited number of columns.
Sort order is important in that table :
1 : weight
2 : order (useful in case of equality of weight)
The Qlikview document herejoined contains the table with a few date, and a screenshot detailing what is the expected result.
I have tried several ways to do it, without success. It probably needs to use rangesum function but I don't know how to specifiy the dimensions on which the rangesum should be applicated.
Thank you for your help !
Something like this:
Sunny,
rangesum(below(sum(weight),1,Rowno()))
In this expression, you specified 1. does the sum start from current row. what if we specify 0 and what rowno() doing?
We have 10 , 8, 0. How are we getting 0?
Regards,
Varun
Or maybe
=aggr( rangesum(below(sum(WEIGHT),1,NoOfRows())), AGENT, ORDER)
allowing you to resort the straight table, with the drawback that the ORDER field needs load order like requested sort order (which is the case in your sample qvw).
Thank you very much Sunny, we are close to the solution.
There's something I miss : why doesn't it work anymore as soon as I add the WEIGHT column within the table ? (all rangesum values are turning to zero)
Didn't succeed to solve it...
Thanks
Add WEIGHT and ORDER as expressions rather than dimension in your chart and see if that works.
Well, I had simplified the table, not imaginating that dimensions could be a problem.
You will find herejoined the table with the dimension I would like to display in that table, including an additional variable which is used in a test.
Adding that dimensions is causing the problem. !
Have you looked at swuehl response? I have not checked it, but I have a feeling that his might not be affected by adding another dimension.
Yes I did the the sorting issue is a real drawback.
I hoped to manage to avoid it 🙂
Adding the dimension will be problematic because if you add dimensions you will need to use Aggr function and Aggr function will sort based on the sort order even if I tell it to no do that. I think you have two options
1) Go by Stefan's method and sort in the script
2) Use all your other dimensions as expressions
If I were you, I will spend some extra time getting it done through method 1.