# App Development

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$400 before Dec 31st: REGISTER NOW!
cancel
Showing results for
Did you mean:
Creator II

## Sorting based on two columns in qliksense straight table

Hi,

I have a scenario where sorting in straight table should be done on two columns.

1. Name sort by alphabetical order

2. Value sort by Sort_ord within the name

Ex: Input

Expected Output

I tried sorting option 1. sort by Name alphabetical 2. sum(Sort_ord) but its not working for few names attached in the Data.xls

I have attached the sample app and sample source data. Please look into it.

Labels (1)
• ### General Question

1 Solution

Accepted Solutions
Specialist III

Hi

Then do it like that

replace dim value by this calculated dimension :

=dual(Value,Sort_ord)

Let column Sort_ord but add 0 in the show column if option

like that :

and as result :

7 Replies
Specialist III

Hi

Is this what you need ?

if yes is the Order in sorting menu option :

Creator II
Author

Output is correct but the Sort_ord column should not be added in the table.

Only Name & Value should be there in the table

Specialist III

Hi

Then do it like that

replace dim value by this calculated dimension :

=dual(Value,Sort_ord)

Let column Sort_ord but add 0 in the show column if option

like that :

and as result :

Creator II
Author

Great! It is working as expected.

Thanks for your time & providing the solution.

But if you select Value "A" from first cell only that particular cell value will be selected. It won't select A from all Names. How do we tackle this issue.

Creator II
Author

Do you have any solution to this scenario. Please suggest

Specialist III

Hi

This seems to work for me :

Dim = Name

Dim = Value

Sort Order :

Name = Auto

Value = order by expression ascending

selecting first Value in Value Field ( A) seems to select all respective value corresponding to 'A' :

Creator II
Author

Thanks for the response.

Tried it but if you see the third value is showing it as B instead it should show X-B

Tags
Community Browser