Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Sorting Problem

Hello,

My sorting is not working properly. But, I want to sort Top to Bottome like >70 and 50-70 and <50. Can you please have a look of attachment. If this is Correct then how to use Sorting Expressiobn.

Can anyone assist me, Please

My Calc Dim

=If(Sales >70, '>70',

If(Sales < 50, '<50',

'50-70'))

Expression

Sum(Sales)/Count( TOTAL Sales)

My Image is looking like this.Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
14 Replies
Chanty4u
MVP
MVP

try this exp in sort tab  exp

=Match(Sales >70,Sales >50-70,Sales > 50,'>70','>50-70','50')

Chanty4u
MVP
MVP

Hi anil,

May be this?

sorttab.PNG

Anil_Babu_Samineni
Author

Yes, In that how to exclude two values from Calc Dimension and Expression for Average.

Original is this, Assist me here for sorting and Calc Dimension, And let me know whether Expression is Correct or wrong?

Dimension

=Aggr(If(Avg( {<name -= {'Key Message Delivery','Sales Objective Category'}>} [2014 Score]) >70, '>70',

If(Avg({<name -= {'Key Message Delivery','Sales Objective Category'}>} [2014 Score]) < 50, '<50',

'50-70')),[2014 rep])

Expression

=Sum({<name = {"*"} - {"Key Message Delivery","Sales Objective Category"}>} [2014 Score])/

Count( TOTAL {<name = {"*"} - {"Key Message Delivery","Sales Objective Category"}>} [2014 Score])

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Chanty4u
MVP
MVP

where you are using the expression above mentioned?

Anil_Babu_Samineni
Author

Chanty What do you mean that?

I've written that expression in Expression tab to calculate the Avg in %

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Chanty4u
MVP
MVP

expression seem right

qliktoview123
Contributor II
Contributor II

Hey,

Please check this attachment.You will get the desired output.I have used dual function in the script for sorting.

Regards,

Atul

Anil_Babu_Samineni
Author

How about dimension?

If dimension is correct then how to write the sort expression for that expression depends on this dimension

Have a look this thread?

Re: Funnel Chart Dimension Problem

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qliktoview123
Contributor II
Contributor II

You need to create a bucket and use dual function to sort it in backend.Please check the script.Once the dimension is available sort it by numerically ascending.