Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
eduardo_dimperio
Specialist II
Specialist II

Help to crescent order a table

Hi,

I need to order my table, but i don't understand why can't i do this.

Dimension:

CAUSA

Measure1:

Count(CAUSA)

Measure2:

Rangesum( Above( COUNT(CAUSA)/count( ALL CAUSA),0,Rowno(Total))) 

Table:

set_analysis.JPG

5 Replies
kaanerisen
Creator III
Creator III

Hi Eduardo,

When you add rangesum(above..) expression to table or table equivalent chart, you can not do ordering over other measures, not dimensions. Dimensions keep working on ordering.

But you can order over measures by using a workaround. Define your measures like a dimension. I know it not the best practice but it is working as you wish

Sorted over first dimension:

Untitled.png

Sorted over measure and not working:

Untitled2.png

Sorted over a dimension which is created to show measure value and working:

Untitled3.png

You should edit your rangesum expression a bit after making these changes

RangeSum(Above(total sum(QTY)/sum(total QTY),0,RowNo(total)))

P.S : After creating this dimension, you should also change its ordering type from auto to custom(Sort numerically) over table properties panel.

Hope it helps...

DavidŠtorek
Creator III
Creator III

Hi

response above in not fully correct. The reason why sorting is disabled is because of RowNo() function "Sorting on y-values in charts or sorting by expression columns in tables is not allowed when RowNo() is used in any of the chart's expressions. These sort alternatives are therefore automatically disabled."

kaanerisen
Creator III
Creator III

Thanks for the correction and tip David. I didn't know that rowNo() function causes this behavior. It is good to know

But that workaround solution still seems valid

eduardo_dimperio
Specialist II
Specialist II
Author

Hi David, thank you for this explanation. But i can't ordinate even if i not use RowNo(). Only when i remove above() that i can ordinate again

eduardo_dimperio
Specialist II
Specialist II
Author

Hi Kaan, nice workaround, but what i need are the accumulated values from that table in crescent order like:

Value in orderAccumulated Value
55
712
1224

Is that a better way to get this withou workaround or RowNo() ?