Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sort by Severity

Hi Experts,

I have defect data . I attached source data and qvw.

in my bar chart I am showing defect count by 'Defect Cause'

now I want to sort the chart based on defect count by Severity

In my example

Configuration2 have 3 critical defects but Configuration3 also have 3 critical defects .

in this case I need to consider high severity defects, now Configuration3 has more high severity defects than Configuration2

So my first bar should be Configuration3 then Configuration2 , Configuration4 and Configuration1

Hope I am clear on my requirement. !

Thanks

BKC

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The qlikview document you posted contains only one Severity value.

Maybe you can get what you need by sorting by an expression like: count([Defect ID])*100+rank(Severity)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi ,

Plz find updated file (I forget to reload).

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

hi Gysbert,

Thanks for your reply.

Configuration2 should be in 2nd place as this one having 3 critical defects .

Thanks

BKC

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Adjust the sort expression as needed.


talk is cheap, supply exceeds demand
Not applicable
Author

You just need to adjust Gysbert's expression slightly.

sum(aggr(count([Defect ID])*rank(Severity),Severity,[Defect Cause])) with desc should work fine

or

sum(aggr(count([Defect ID])*rank(Severity),Severity,[Defect Cause]))*-1 with asc

Joe

Anonymous
Not applicable
Author

Its not working as expected ... If config2  have 3 critical defects and config3 has 4 critical defects and I add more severity 2-High in Configuration2  then confing2 is comming in first place. config3 should be in first place as it is having 4 .

Plz help

Thanks

BKC