Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
bobink123
Contributor II
Contributor II

Sort Table by Absolute Values

tables Hi,

I have a straight table and I want to sort the Data by absolute values. For example currently I sort by gross amount and the data goes from top payments to top receipts.

e.g   -12,000

          -9,000

          -2,000

           5,000

           7,000 etc

 

However I want to sort it so the plus and minus signs still show however they are sorted by the absolute amounts.

e.g

-12,000

-9,000

7,000

5,000

-2,000

I have gone to Sorting on the table and on the gross column there is no option to enter "Sort by Expression" 

 

any ideas?

 

Many Thanks,

Bob

Labels (2)
8 Replies
OmarBenSalem

go to ur dimension in the sorting not the actual measure and there sort by expression

:

fabs(sum(YourMeasure))

bobink123
Contributor II
Contributor II
Author

Hi Omar,

There is option in Sorting. only for that particular measure.

I have attached a picture for your reference.

 

 

 

 

bobink123
Contributor II
Contributor II
Author

No Expression in Sort.png

OmarBenSalem

In the sorting tab, put the Banking Name above ur measure (Gross) and there sort by expression

Fabs(sum(UrGrossMeasure))

bobink123
Contributor II
Contributor II
Author

It still is returning incorrect values, now sorting by Bank Name - I have found one way around it which is to create a new gross column, turn the expression into absolute values then sort according to that column.

Do you know if there is a way to hide a column in QLIK?

OmarBenSalem

What version are u using?

bobink123
Contributor II
Contributor II
Author

The newest update.

I have found a way around in that I create a new column and sort based on absolute then hide that column at the end so it gives the desired result

However I have not found another solution so would be god to have that knowledge

Thanks!

fe-c
Contributor III
Contributor III

Hello Bobink123, 

how do you reset your visualization (to sort by absolute value / hidden column) after a user changes the sorting?