Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

sort in stacked bar

hi all,

how to sort the stacked bar as per the value

below is the data

dept           student

IT                100

CSE             200

Robotics          300

CSE               500

Robotics          50

robotics          150

now when i used dimension as Dept and calcualted dimension as 1 and student count as expression i m getting the output , but values are  not sorted even when i used sorting from low to high

how to do that, please help me

25 Replies
manoranjan_d
Specialist
Specialist
Author

gautik92
Specialist III
Specialist III

i hope it wont help you i misuds your req

manoranjan_d
Specialist
Specialist
Author

hi naga,

i m getting the output thanks, when i m using the expression as ascending or descending  in sort tab, but in case if we are using two expression means how to do that ?

manoranjan_d
Specialist
Specialist
Author

hi NagaianK


i m waiting for ur reply, how to do the same sort in the stack bar bar for two expression.

gautik92
Specialist III
Specialist III

This one

manoranjan_d
Specialist
Specialist
Author

Hi gwtham,

can u send  me the file to my mail id maoranjan321988@yahoo.com, bcoz i cant see ur file

gautik92
Specialist III
Specialist III

what is the second expression

gautik92
Specialist III
Specialist III

i don have email access sry

ill tel the steps to do

first dimesion =valuelist('1')

second dimesion=dept

expr=sum(student)

sort=select dept->by expr->sum(sales) by desc

style stacked

manoranjan_d
Specialist
Specialist
Author

i can see your file

manoranjan_d
Specialist
Specialist
Author

gowtham u have to give sort expresiion only on dept, not on the both, just now checked it, then only assending or descending is happening, so remove the sort expression in the value list a