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: 
Not applicable

Sorting straight table by expression

Hello,

I have a straight table with Names as dimensions, and then i have an expression:

Can i sort the expression by another expression??

22 Replies
Or
MVP
MVP

Thomas,

You cannot sort an expression by another expression. You should sort your *dimension* based on an expression. In your case, follow the instructions mentioned above, but on the Eventtype field.

Not applicable
Author

No, cause i dont want it to be sorted by my expression, and want it to be sorted on another expression, which is not included in the table.

But then i should make a new expression and then hide it

jagan
Luminary Alumni
Luminary Alumni

Hi,

Give the expression in

Chart Properties -> Sort -> Select Expression and put your expression there.  If not working can you attach some sample data.

Regards,

Jagan.

Not applicable
Author

thats not what im looking for

Not applicable
Author

I still cannot select expression on my expression:

On my sort tab i have:

Dimension: Eventtype

Expression: sum(blabla)

I wanna sort on the expression

Or
MVP
MVP

Then I once again suggest you post a sample QVW.

Sorting an expression based on an expression doesn't make any sense. You can't sort an expression on its own - it has to be tied to dimensions.

Not applicable
Author

in my case it does

I cannot post an example sorry:/

DavidFoster1
Specialist
Specialist

Hi Thomas

If I understand correctly you have 3 options:

1) You can sort by y-value which refers to the first expression in your chart/table. But this only allows ascending/descending sorting.

2) You select your dimension and then use an expression sort. This is effectively adding another expression to your chart/table. The expression does not have to be related to the dimension directly, it just has to make sense in the table/chart

3) Add the second expression to your chart, sort on it and then hide it (I have not tested this one)

Or
MVP
MVP

I'm still not following.

Dimension - Expression - SortValue

A - 50 - 3

B - 100 - 1

C - 200 - 2

D - 150 - 4

What I would expect you are trying to get is:

B - 100

C - 200

A - 50

D - 150

Your expected result, if I understand your request correctly, is:

A - 100

B - 200

C - 50

D - 150

Is that what you're trying to achieve? Sort the expressions without considering the dimensions they are attached to?

Not applicable
Author

Correct!