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

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
cancel
Showing results for 
Search instead for 
Did you mean: 
justindallasverizon
Contributor III
Contributor III

Is sort guaranteed from datamodel to straight table?

Hello Folks,

 

My stakeholders want the datasort to be maintained from the db view (which has no ORDER BY) clause.  My question is,

 

Does a straight table display the data in the same order it's retrieved from the database?

I know we can sort the data manually, but they want it shown a specific way.

Labels (3)
2 Replies
rwunderlich
MVP
MVP

Generally yes, you can set up the table to display in order loaded. In the Sort property for the column, if both "Sort numerically" and "Sort alphabetically", then the column is sort by Load Order. Load Order is the order in which the unique column values were first seen during the load. You can manipulate a specific load order https://qlikviewcookbook.com/2012/11/establishing-a-sort-order/

-Rob

Chanty4u
MVP
MVP

Hi try this 

If stakeholders require a specific order, create an explicit sort field in the data model.

For example, if the required order is:

Critical

High

Medium

Low

In script 

LOAD

    Priority,

    Match(Priority, 'Critical', 'High', 'Medium', 'Low') as PrioritySort,

    ...

FROM ...;

 

Then in the straight table:

Sorting → PrioritySort → Ascending

You can hide PrioritySort from the visualization if you don't want users to see it.