Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to do 2 sort on the same table

Good Afternoon,

I have a problem with two "sort" on the same table.

I have two dimensions Product and Customer and two metrics Value and Price.

The goal was to create a Bottom 3 of Customers by Product, I had to apply a formula so it does not consider the zeros.

But now I want to do two sort on the same table, so I want to do "sort" the Customers by Price (Ascending) and then I still want to do "sort" the Products By Value (Only for Total Product - Descending).

What is happening now is the table does the "sort" for total of all values and not by total of the three values on the table (Partial Total), although show the right totals.

You may confirm the example (.qvw) (In Attachment).

The result I wanted to present is:

CustomerProductValuePrice
10D0-1
5D50,5
12D40,65
TotalTotal D90,15
5B-1,5-0,25
17B42
20B42
TotalTotal B6,53,75
9A-3,6-2,3
8A31
6A52,5
TotalTotal A4,41,2
2C0-0,3
6C11,6
9C-4,82
TotalTotal C-3,83,3

I hope someone can help me.

Thanks in advance.

Ana

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello Everyone

Thanks for your help, but I already solved my problem.

I've attached the example qvw with solution, if someone has interested.


Ana

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Some suggestion, please?

raajaswin
Creator III
Creator III

Hi,

Try by giving sort condtion as expression aggr(sum(),) with ur necesary column

Anonymous
Not applicable
Author

The table has the same behavior.

I already try many things but the table keeps the "sort" of all values. I need to do the "sort" just to values on the table.

raajaswin
Creator III
Creator III

up to my knowledge,I think the problem is in your expression used. i tried removing the '-' you used in your expression it is working. but the logic becomes wrong now. So try building some other expression. It may work

raajaswin
Creator III
Creator III

Hi,

avinashelite

You can enable the interactive sort option based on the user needs you can sort the same .

Anonymous
Not applicable
Author

hi ana,

please have a look at below post if you are looking for sort in Pivot:

Second Dimension Sort w/ Expression

Anonymous
Not applicable
Author

Hello Everyone

Thanks for your help, but I already solved my problem.

I've attached the example qvw with solution, if someone has interested.


Ana