Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
s10157754
Creator III
Creator III

How to sort pie chart in descending order without any dimension?

Dear Qlikview Experts,

I have came across a situation whereby I do not have any dimension but with multiple expressions in a pie chart. The problem that I have faced was that I am not able to sort the pie chart in descending order. So I was wondering is it possible for me to sort the pie chart based on expression return value? (Such as from biggest % to smallest %) but I have no idea on how to do this.

Capture1.PNG

I had attached the sample Qlikview File for your reference. Any other alternative ways to achieve the same outcome will be greatly appreciated as well! Thanks for your help in advanced!

Best Regards

QianNing

1 Solution

Accepted Solutions
tresesco
MVP
MVP

1.Take Result as dimension.

2.Expression:  =count([Result]) / count( total Result)

3. Sort by: 'Y Value' - Descending

View solution in original post

11 Replies
tresesco
MVP
MVP

PFA

Capture.JPG

devarasu07
Master II
Master II

Hi,

just create measure like below,

count(Result)/count(TOTAL Result)

and sort tab add this expression and sort order change to desc.  like below,

Capture.JPG

s10157754
Creator III
Creator III
Author

Dear Tresesco,

As I was using personal edition. If possible can guide me step by step on how you did this? Thanks for your help in advance!

Best Regards,

QianNing

tresesco
MVP
MVP

1.Take Result as dimension.

2.Expression:  =count([Result]) / count( total Result)

3. Sort by: 'Y Value' - Descending

satheshreddy
Creator III
Creator III

Hi Zhang,

open chart Properties and got to sort and select Expression Sorting there you can paste your expression and select descending order and press apply and Press OK now you can see the requirement result.

Regards

Sathesh

s10157754
Creator III
Creator III
Author

Dear Tresesco,

Thanks for your prompt reply. As I need to create different labelling for "Good", "Intermittent" & "Invalid". So I cannot use the solution that you have provided above. Is there a way to sort based on expression return value? Thanks so much for your help in advance!

Best Regards,

QianNing

s10157754
Creator III
Creator III
Author

Dear Devarasu,

Thanks for your prompt reply. As I need to create different labelling for "Good", "Intermittent" & "Invalid". So I cannot use the solution that you have provided above. Is there a way to sort based on expression return value? Thanks so much for your help in advance!

Best Regards,

QianNing

s10157754
Creator III
Creator III
Author

Dear Satti,

Thanks for your idea, but it looks like there is no way for me to paste my expressions under sort tab without a dimension.

Best Regards,

QianNing

satheshreddy
Creator III
Creator III

Hi Zhang,

you write using if condition like below

if(A='Good',1,if(A='M',2))

Regards

Sathish