2 Replies Latest reply: Jul 24, 2013 12:36 PM by Samuel GUERIN

# Accumulated against sorting data in straight table

Hi everyboy,

I am quite surprised to have so many problemes on a very simple looking case.

I've got two dimension : Dim1, Dim2

I've got just a data : Volume

I just want, in a straight table, have Dim1,Dim2 dimension with Sum(Volume) as expression.

I want to have a decreasing sort on Sum(Volume) without considering the dimensions.

So far, so good.

Then I want to add an expression that calculate the proportion of  Sum(Volume) against the total ==> Sum(Volume)/Sum(total Volume) in %

So far, so good again.

But when I want a cumulative vision of my proportion of Sum(Volume) against the total, I've got more difficulties !

After lots of try, I've found an expression that make me well my cumulative vision () , but I lost the decreasing sort on Sum(Volume) :

=rangesum(above(total (Sum(Volume)/Sum(total Volume)),0, rowno(total)))

http://community.qlik.com/message/360555

I've got no idea left ;-(

I've attached a sample with what I expected.

• ###### Re: Accumulated against sorting data in straight table

Add a calculated dimension to sort on and then hide it. See attached example.

• ###### Re: Accumulated against sorting data in straight table

Great ! Thanks a lot Gysbert.

I think is one among many solution.

I've found one a bit more different.

I've add a calculated dimension that is just the concatenation of Dim1+Dim2

An then I've set a decreasing sort order on each dimension with the expression  "Sum(Volume)".