Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Creating a sort order

Hi

I have a dimension in the table with the following calculated expression, I am getting the values from 2 different columns., how do I specify the sort order for the values ?

I want sort order to be as below :

'Uptime',

'Escapes / Mo'

P0 and P1 in Production'

'FCI Top 50'

=if(match(Category,'Escapes / Mo','P0 and P1 in Production'),Category,
if(match([User Friendly Metric Name],'Uptime','FCI Top 50'),[User Friendly Metric Name]))

Thanks!

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

If the list is static, then you can do a dummy load in the script to set the sort order:

Dummy:

LOAD * Inline

[

  Category

  Uptime

  Escapes / Mo

  P0 and P1 in Production

  FCI Top 50

];

... existing load that includes Category ...

DROP Table Dummy;

QV remembers the field sort order from the first load containing the field. Set the sort order to LOAD order.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
swuehl
MVP
MVP

Maybe try a sort by expression with expression

=Match( if(match(Category,'Escapes / Mo','P0 and P1 in Production'),Category,
if(match([User Friendly Metric Name],'Uptime','FCI Top 50'),[User Friendly Metric Name])),

'Uptime',

'Escapes / Mo',

P0 and P1 in Production',

'FCI Top 50'

)

Anonymous
Not applicable
Author

Thank you .. how do I avoid sort by state .. I mean I don't want the selected value to be top of the table .. I don't see that option to disable ..

sunny_talwar

I this pivot table we are talking about?

sasikanth
Master
Master

try some thing like

wildmatch( only{1} if(match(Category,'Escapes / Mo','P0 and P1 in Production'),Category,
if(match([User Friendly Metric Name],'Uptime','FCI Top 50'),[User Friendly Metric Name])),

'Uptime',

'Escapes / Mo',

P0 and P1 in Production',

'FCI Top 50'

)

if the scroll bar is enabled in any object say List box then by default qlikview moves the selection to top.

sujeetsingh
Master III
Master III

Why not to define a sort order in backend and just calling it in your sort expression at UI.

jonathandienst
Partner - Champion III
Partner - Champion III

If the list is static, then you can do a dummy load in the script to set the sort order:

Dummy:

LOAD * Inline

[

  Category

  Uptime

  Escapes / Mo

  P0 and P1 in Production

  FCI Top 50

];

... existing load that includes Category ...

DROP Table Dummy;

QV remembers the field sort order from the first load containing the field. Set the sort order to LOAD order.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

in sort tab have the to sort the according to the asc or desc